Hi, I need to modify my overviewMap like I did in my Flex Application where I added one different and independent layer (no extent change after I load it first time)
I started editing createOverviewMap function at the line:
json.map = this.map;
to:
map = new Map("map", {extent:
new Extent({xmin:-959349.2571061972,ymin:5748904.384372205,xmax:962566.5968742102,ymax:5750663.337890111,spatialReference:{wkid:102100}})
});
var featureLayer = new FeatureLayer("../arcgis/rest/services/overviewMap/MapServer", {
mode: FeatureLayer.MODE_ONDEMAND
});
map.addLayer(featureLayer);
//json.map = map;
json.map = this.map;
but the overviewMap doesnt show anything.
maybe why the layer I'm trying to load in overviewMap has a different extent of the map...and it is not contained in the map extent and viceversa.
Thanks,
Naty
Solved! Go to Solution.
Naty,
You have "var featureLayer = new FeatureLayer("../arcgis/rest/services/overviewMap/MapServer", { " but a FeatureLayer requires a url with a specific sublayer id.
Naty,
You have "var featureLayer = new FeatureLayer("../arcgis/rest/services/overviewMap/MapServer", { " but a FeatureLayer requires a url with a specific sublayer id.
Robert, I need to disable the link to the main map, what should I do?
If I zoom or I change the extent in the main map I dont want any change of extent or pan in the overviewMap.
Thanks!!
Naty
Naty,
The OverviewMap Widget use the JS API OverviewMap dijit and you do not have control over disconnecting it from extent changes. You only option is to develop a custom widget that is just a map class if you want a small static map.
Robert, so maybe I can replace overviewMapDijit references with a simple Map?
Thanks,
Naty
Naty,
Possibly, I have never tried that.