【ArcGIS for Android】經緯度座標、地圖投影座標、屏幕座標互相轉換
1. 屏幕座標轉換成投影座標
MapView map;
...
public void onSingleTap(float x, float y) {
Point clickPoint = map.toMapPoint(x,y);
...
2. 投影座標轉換成經緯度
接1,
Point wgsPoint = (Point) GeometryEngine.project(clickPoint ,map.getSpatialReference(),SpatialReference.create(4326));
- 1
- 1
3、經緯度轉換成投影座標
Point mapPoint = (Point) GeometryEngine.project(wgsPoint ,SpatialReference.create(4326),map.getSpatialReference());
- 1
- 1
4、投影座標轉換成屏幕座標
接3,
Point screenPoint
= map.toScreenPoint(mapPoint);
轉載自http://blog.csdn.net/anykiuro/article/details/51425899