1
我想轉換點經度和緯度,爲下面的代碼我有一點:如何在arcgis android中將點轉換爲經度和緯度?
mMapView.setOnSingleTapListener(new OnSingleTapListener() {
@Override
public void onSingleTap(float x, float y) {
callout.hide();
int[] graphicIDs = graphicsLayer.getGraphicIDs(x, y, 25);
if (graphicIDs != null && graphicIDs.length > 0) {
Graphic gr = graphicsLayer.getGraphic(graphicIDs[0]);
updateContent((String) gr.getAttributeValue("Rating"),
(String) gr.getAttributeValue("Title"));
Point location = (Point) gr.getGeometry();
callout.setOffset(0, -15);
callout.show(location, content);
}
}
我有這個變量location
如何找出經度和緯度,我已經改變了經度和緯度點爲如下:
double mercatorX = longtitude* 0.017453292519943295 * 6378137.0;
double a = latitude * 0.017453292519943295;
double mercatorY = 3189068.5 * Math.log((1.0 + Math.sin(a))
/(1.0 - Math.sin(a)));
請我需要您的評論...
然後做逆。當你是一名程序員時,數學並不難;) – 2014-09-29 17:26:08
我的大腦現在不能工作;),如果可以的話,請儘量幫助我? – ROR 2014-09-29 17:28:08