Is it possible to 'reset' all of the properties (e.g. LODs, spatial reference, layers, etc.) for a Map component without creating a new one?
I would like to 'swap' some layers that have different spatial references and the only way that this works for me is to either create a new Map instance or have a Map instance for each spatial reference to be used.
The map's spatialReference property is read-only since we don't officially support changing it. Technically, it can be changed though by setting map.spatialReference.wkid. You'll also need to reproject any client side graphics.
The map's spatialReference property is read-only since we don't officially support changing it. Technically, it can be changed though by setting map.spatialReference.wkid. You'll also need to reproject any client side graphics.
Hi Dasa,
It turns out that it is possible to 'swap' map services just by changing the layer's url. They just need to have matching LODs. Since my demo was using two services with no common LODs, I was getting an empty map when changing map services. The way I was overcoming this was to create new instances of Map for each 'swap.'