Set overview map extent

1280
3
03-25-2013 10:39 AM
Udaya_BhaskerCheerala
New Contributor
Hi All,

I'd like to add an overview map to my map but in all of the samples using overview maps that I've seen, the overview map pans and zooms (albeit at the specification ratio compared to the main map). I don't want this behavior. Is it possible to "lock" the background of the overview map to a specified extent and have just the main map's map extent move around?

I want my overview map to show the full extent of my State Layer and just have the representation of the main map's map extent move around.

We are using Javascript API 3.1

Thanks,
-U
Tags(2)
0Kudos
3 Replies
Udaya_BhaskerCheerala
New Contributor
Anybody found solution?

Thanks,
-U





Hi All,

I'd like to add an overview map to my map but in all of the samples using overview maps that I've seen, the overview map pans and zooms (albeit at the specification ratio compared to the main map). I don't want this behavior. Is it possible to "lock" the background of the overview map to a specified extent and have just the main map's map extent move around?

I want my overview map to show the full extent of my State Layer and just have the representation of the main map's map extent move around.

We are using Javascript API 3.1

Thanks,
-U
0Kudos
DavideLimosani
Occasional Contributor II
You can't get this behaviour with the OverviewMap widget.

I think you should create a second map, remove the zoom slider, disable navigation and in an 'OnExtentChange' event of the main map create an extent graphic on the second one.
0Kudos
ManojrajTeli
Occasional Contributor II
You can do something like this
var initExtent = new esri.geometry.Extent(-12516666.18100186, -14473454.10510185, 5059768.712762767, 4075259.788449963, new esri.SpatialReference({ wkid: 102100 })); overviewMapDijit.map.setExtent(esri.geometry.geographicToWebMercator(initExtent));



or you can specify the lods for the map. I tried on sample example and it worked but did not get it correct extent but it should definetly work when you specify correct extent.
0Kudos