independent overviewMap

1915
5
Jump to solution
07-08-2016 01:45 AM
NatashaManzuiga
Occasional Contributor

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

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Naty,

You have "var featureLayer = new FeatureLayer("../arcgis/rest/services/overviewMap/MapServer", { " but a FeatureLayer requires a url with a specific sublayer id.

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Naty,

You have "var featureLayer = new FeatureLayer("../arcgis/rest/services/overviewMap/MapServer", { " but a FeatureLayer requires a url with a specific sublayer id.

NatashaManzuiga
Occasional Contributor

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

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos
NatashaManzuiga
Occasional Contributor

Robert, so maybe I can replace overviewMapDijit references with a simple Map?

Thanks,

Naty

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Naty,

  Possibly, I have never tried that.

0 Kudos