@Override
public boolean onSingleTapUp(@NonNull MotionEvent e) {
int x = (int) e.getX();
int y = (int) e.getY();
Point2D pt = mMapControl.getMap().pixelToMap(new Point(x, y));
//当投影不是经纬坐标系时,则对起始点进行投影转换
if(mMapControl.getMap().getPrjCoordSys().getType() != PrjCoordSysType.PCS_EARTH_LONGITUDE_LATITUDE){
Point2Ds points = new Point2Ds();
points.add(pt);
PrjCoordSys desPrjCoorSys = new PrjCoordSys();
desPrjCoorSys.setType(PrjCoordSysType.PCS_EARTH_LONGITUDE_LATITUDE);
CoordSysTranslator.convert(points, mMapControl.getMap().getPrjCoordSys(), desPrjCoorSys,
new CoordSysTransParameter(), CoordSysTransMethod.MTH_GEOCENTRIC_TRANSLATION);
Point2D point2D = points.getItem(0);
}
return false ;
}
转换前的坐标值 pt= {X=5073.113069158538,Y=-1846.348949450914} ,转换后 point2D 还是这个值,没有起到转换效果。麻烦问一下问题出在哪里