Skip to content

Instantly share code, notes, and snippets.

@dbouwman
Last active January 2, 2016 18:59
Show Gist options
  • Save dbouwman/8347389 to your computer and use it in GitHub Desktop.
Save dbouwman/8347389 to your computer and use it in GitHub Desktop.
Example of how to work around min/max scale on feature layers
require(["esri/map",
"esri/layers/FeatureLayer",
"dojo/domReady!"],
function(Map, FeatureLayer) {
map = new Map("mapDiv", {
center: [-111.8, 40.7],
zoom: 3,
basemap: "gray"
});
//this layer has minscale of 100,000 yet it will be drawn on this map at zoom level 3
l = new FeatureLayer('http://sampleserver6.arcgisonline.com/arcgis/rest/services/RedlandsEmergencyVehicles/FeatureServer/0');
l.on("load", function() { l.minScale = 0; l.maxScale = 0; });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment