1

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:

  1. Let xy be some lat/long
  2. If xy is in specified extent area as mentioned above (means is in the area which I have downloaded)
  3. 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.

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
yash
  • 387
  • 1
  • 5
  • 20
  • 1
    Those extent values look to be in meters, whereas your lat/long are likely in decimal degrees. If you set your extent in degrees as well, this may resolve your problem. – Erica Dec 18 '15 at 14:15

0 Answers0