davedoop

ArcGISDynamicMapServiceLayer.visibleAtMapScale

Discussion created by davedoop on Nov 8, 2013
Hi all

What am I missing to get these functions to work - ArcGISDynamicMapServiceLayer.visible, ArcGISDynamicMapServiceLayer.visibleAtMapScale?  I'm trying to prevent a doIdentify function when the identify layer is not visible do to scale dependency.

As implemented below, parcelLayer.visibleAtMapScale returns true at all scales even if the layer is not actually visible at a particular scale.

      function doIdentify(evt) {
  if (parcelLayer.visibleAtMapScale) {   
   map.graphics.clear();
   identifyParams.geometry = evt.mapPoint;
   identifyParams.mapExtent = map.extent;
   identifyTask.execute(identifyParams, function(idResults) { addToMap(idResults, evt); });
  }
      }


thanks!

Outcomes