AnsweredAssumed Answered

Toggle pop-up on and off & z-index

Question asked by JohnWallX on Jun 15, 2012
Latest reply on Jun 15, 2012 by JohnWallX
I am attempting to allow for the pop-up to be toggled on and off by pressing a checkbox. Here are some snippets of the code:

                        var popup = new esri.dijit.Popup({
    fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,
    new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
    new dojo.Color([255,0,0]), 2),
    new dojo.Color([255,255,0,0.25]))
   },
   dojo.create("div"));

   map = new esri.Map("map",{
    infoWindow: popup,
    outFields: ["*"]
   });

   function activateIdentify(popup){
    if (dijit.byId("popupid").checked) {
     identifyListener = dojo.connect(map, "onClick", function(evt){
      var query = new esri.tasks.Query();
      query.geometry = pointToExtent(map,evt.mapPoint,10);
        
      var deferred = featureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);

      map.infoWindow.setFeatures([deferred]);
      map.infoWindow.show(evt.mapPoint);
     });
    }
    else {
     dojo.disconnect(identifyListener);
    }
   }

                       <input type='checkbox' id="popupid"/><label>Tick here to turn selecting on.</label><br/>


Additionally, I am trying to allow for the pop-up to show above the Overview Map. I know that the Overview Map has a z-index attribute, but it seems that the pop-up does not have this attribute. Is this the case? If not, could someone tell me where to change the z-index for the pop-up?

Outcomes