AnsweredAssumed Answered

programmatically showing/hiding Overview map

Question asked by Sal_Joensen on Mar 26, 2012
Latest reply on Apr 24, 2012 by Sal_Joensen
I have a problem with hiding the Overview map once I've programmatically made it visible. I reckon it is how I refresh the Overview map with 'overviewMapDijit.startup()' since it shows in the console that it is set to be hidden, even though it's still visible. Might this be a bug or a refresh problem?

        dojo.connect(map, 'onLoad', function(theMap) {           // resize the map when the browser resizes           dojo.connect(dijit.byId('map'), 'resize', map,map.resize);                      // add the overview map      overviewMapDijit = new esri.dijit.OverviewMap({       NLS_drag: "flyt til at broyta kort ekstentið",    NLS_hide: "Goym yvirlitskortið",    NLS_show: "Vís yvirlitskortið",    map:map,    visible: false,    opacity: .25,       attachTo:"top-right",     color:"#FF0000",    expandFactor: 4  // kortið zoomar í mesta lagið 4 ferðir størri enn overview kortið vísur.     });                overviewMapDijit.startup();              var scalebar = new esri.dijit.Scalebar({             map: map,             scalebarUnit:'metric'           });         });      dojo.connect(map, "onZoomEnd", function(evt) {    if (map.extent.xmax - map.extent.xmin < 150000)    {     overviewMapDijit.visible = true;     overviewMapDijit.startup();    }        if (map.extent.xmax - map.extent.xmin > 150000)    {     overviewMapDijit.visible = false;     overviewMapDijit.startup();    }       });

Outcomes