selectFeatures with scale dependent layer is removing the graphic

1325
1
Jump to solution
02-24-2016 02:05 PM
BhavinSanghani
Occasional Contributor II

If I try to select the feature of scale dependent layer (e.g 1:1000) and zoom then the highlighted graphic is removed.

See the attached example. Specify ArcGIS Server <hostname>, <ServiceName>, <layerId> and specify <Where Clause> with appropriate values and execute the example. Check console log that the 'graphic-remove' is getting fired after the graphic is added to the map.

There is no issue with this code if the layer has no scale dependencies. ESRI support submitted bug for this. But this is like very basic scenario so, wondering if any one has workaround. ESRI support gave me the workaround to select the feature again when it gets removed. But it's difficult to track whether the 'gaphic-remove' is fired due to user's action or api bug.

Any workaround?

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Bhavin,

   You could set the FeatureLayers minScale and maxScale properties to 0 when you add the FL to the map.

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Emeritus

Bhavin,

   You could set the FeatureLayers minScale and maxScale properties to 0 when you add the FL to the map.