mhadi11

How to correctly set minScale and maxScale of a FeatureLayer?

Discussion created by mhadi11 on Feb 8, 2011
Latest reply on Feb 22, 2011 by mhadi11
Hi,
I am desperately trying to set minimum and maximum scale of a feature layer using WKID 4326 as follows but I fail to do so what am I missing?
var featureLayer = new esri.layers.FeatureLayer("http://myserver/ArcGIS/rest/services/myservice/MapServer/1",{
          mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
          outFields: ["*"],
  });
featureLayer.maxScale=0;
featureLayer.minScale=10000/111195; //Convert to decimal degrees
map.addLayer(featureLayer);

Outcomes