Select to view content in your preferred language

HELP! Making a Feature Layer invisible when zoomed into Area of Interest

2959
1
07-22-2015 12:56 PM
JamesFitzgerald
Frequent Contributor

Hello,

How do I set the feature layer to disappear when zoomed into an Area of Interest?  Any help is appreciated, references,or documents. Thanks!

var featureLayerParks = new FeatureLayer("http://services.arcgis.com/HYLRafMc4Ux6DA8c/arcgis/rest/services/Parks_Search/FeatureServer/1", {
         mode: FeatureLayer.MODE_ONDEMAND,
         visible: FeatureLayer.isVisibleAtMapScale=true
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

James,

   When you say area of interest you mean a certain extent right? If this is the case then you need to attach an event to the maps extent-change event and determine if your AOI extent intersects the maps extent (or contains).