Select to view content in your preferred language

Check location under the basemap extent

453
1
Jump to solution
09-18-2019 11:47 AM
DevendraKhatri
Emerging Contributor

I have a basemap downloaded with some extent to my mobile device and I use Location display manager to detect user's current location. How do I show user a message if his downloaded basemap does not have the current location.

One way I found is to get the extent coordinates of the basemap and use it againt LocationDisplay.getMapLocation() that gives current location and do a check using GeometryEngine.contains().

Is there a different way to achieve this ?

0 Kudos
1 Solution

Accepted Solutions
Nicholas-Furness
Esri Regular Contributor

Hi Devendra Khatri. That seems like a sensible way to do it.

You could also have used intersects() in this case.

See this page, and in particular look at each relational operator at the bottom of that page. There are some good diagrams and discussions there. 

View solution in original post

1 Reply
Nicholas-Furness
Esri Regular Contributor

Hi Devendra Khatri. That seems like a sensible way to do it.

You could also have used intersects() in this case.

See this page, and in particular look at each relational operator at the bottom of that page. There are some good diagrams and discussions there.