I am using arcgis map for offline map in my Android application, so I have downloaded a map with some extent values i.e.
{
"xmin" : -12699130,
"ymin" : 3988230,
"xmax" : -12699130,
"ymax" : 5178858,
"spatialReference" : {
"wkid" : 3857
}
}
Now I want to apply my logic like this:
- Let xy be some lat/long
- If xy is in specified extent area as mentioned above (means is in the area which I have downloaded)
- Only then open the arcgis map otherwise open skobbler map (using for offline street map), same as arcgis offline map but only provide street view.
I tried some code like this below:
//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);
Problem:
First, I am unable to convert lat/long to the points so I think this might be the problem.
Second, I am now inflating the MapView
and trying mMapView.getSpatialReference()
function call.
Finally, my whole process for checking is wrong.