Set mapView spatial reference before adding layer? Related to offline map.

2777
1
09-01-2011 05:00 PM
ChristopherEbright
New Contributor III
I know you can't set the spatial reference directly for the mapView, but is there something out there that let's me instantiate a mapView with a certain spatial reference and extents with loading a layer first?
I am trying to develop an app that can function entirely offline if need be, but so far the only way i can get that to work is by using the cached map way, as illustrated in the CustomTileOverlay sample app. Unfortunately, I don't intend to load my basemaps this way, so i would have to just have dummy tile in order to get the map view to load properly.
I have tried loading layers using the decodeFromJSON method and a local file, but it doesn't seem to work unless i also have a local cache as well.
0 Kudos
1 Reply
NimeshJarecha
Esri Regular Contributor
The spatial reference and extent of the mapView is being set by first layer you load in it. There is no other way.

Regards,
Nimesh
0 Kudos