Issues with initial mapview extent

3659
0
03-04-2015 07:56 AM
KeithTurner
New Contributor III

We're using the MapView(Context, MapOptions) constructor in 10.2.3 to create our mapview, and allow basemap switching.  The MapOptions specifies lat, lon, a zoom level of 13 and a MapType basemap.  When the mapview appears on the screen, it opens to the full extent (world).  At some point after that extent loads, the map zooms to the correct center coordinate and zoom level.  Sometimes, possibly after an initial installation of the app, this takes 10-15 seconds on my device.  For usability, we'd like the initial extent to be based off the parameters we specify in MapOptions, and the docs read like that's how it should act ("The constructor is used if you are instantiating the MapView using the given options including basemap, zoom leven and map center.").

A bigger problem is that we also do other things based on the center and extent of the map.  With the map loading the full extent, and some length of time later, changing to the correct extent, those things aren't working when called from onstatuschanged.  Putting in a delay of 15-20s to workaround the pause mentioned above is not a workable solution.

How can I get the MapView(Context, MapOptions) to open to the extent defined by the lat/lon/zoomlevel specified in MapOptions?

Any ideas what may be causing the extended pause, which seems to be after a fresh install?

Thanks

Keith

0 Kudos
0 Replies