Anyway to check whether the basemap is available?

559
3
Jump to solution
04-18-2013 07:27 AM
DawenXie
New Contributor III
I need to show a set of points on a basemap, e.g., ESRI's streets map. I use esri.graphicsExtent(graphics) to set the default extent. The problem here is that on some regions, the basemap is not available for a given extent. Altough the user can zoom out to see the points, it would be nice if I can set the default extent in a better way. The question is: for a given extent, is there a way to check whether the basemap is available?
0 Kudos
1 Solution

Accepted Solutions
derekswingley1
Frequent Contributor
Unfortunately no, there's not a way to know whether tiles displayed from a basemap are actual map tiles or "map unavailable" tiles.

View solution in original post

0 Kudos
3 Replies
derekswingley1
Frequent Contributor
Unfortunately no, there's not a way to know whether tiles displayed from a basemap are actual map tiles or "map unavailable" tiles.
0 Kudos
DawenXie
New Contributor III
Thanks for your quick response Derek!

The data I have is a person's synthetic activities. Here the person could be in U.S., or other countries and the extent for their activities could be small (and the extent is small) or relatively big. Do you have suggestion on how to set the intial extent when I have all the data ready? Or, just ask my end-users to wait till ESRI provides better basemap for some regions? 🙂

Unfortunately no, there's not a way to know whether tiles displayed from a basemap are actual map tiles or "map unavailable" tiles.
0 Kudos
derekswingley1
Frequent Contributor
My only thought is to set a maximum zoom level in your app and stick to that. You could look at extent size (width or height) for a set of activities and, if it's smaller than some threshold, you could use centerAndZoom to the center of the extent and a zoom level rather than passing the extent directly to map.setExtent.
0 Kudos