我在Android应用程序中使用arcgis map作为离线地图,因此我下载了一个具有一定范围值的地图,即
{
"xmin" : -12699130,
"ymin" : 3988230,
"xmax" : -12699130,
"ymax" : 5178858,
"spatialReference" : {
"wkid" : 3857
}
}
现在我想应用我的逻辑:
我尝试了以下代码:
//First set the extent and made a envelope
Envelope extentForTPK = new Envelope();
extentForTPK.setCoords(-12699130,3988230,-12699130,5178858);
//Then created a point from lat/long and checking if the point is inside the envelope(ie extentForTpk)
Point wgspoint=new Point(lat, long);
首先,我无法将lat / long转换为积分,因此我认为这可能是问题所在。
其次,我现在正在充气MapView
并尝试mMapView.getSpatialReference()
函数调用。
最后,我的整个检查过程都是错误的。