0

I have requirement where i have to use web map . I have have lots of feature layers which will loaded conditionally hence in my json i have provided visibility as false for all layers then i have modify json conditionally and set visibility to true for some layers. The problem is once we set visibility to true , all the features will be loaded instead i want to set Definition or pass some query task where i can load features based on need.

1 Answer 1

1

you can use FeatureLayer.setDefinitionExpression()

2
  • We cant use FeatureLayer.setDefinitionExpression() when creating web map if it can please share us code or link.
    – VIckyb
    Commented Dec 18, 2014 at 6:23
  • this method is available in the application itself after the webmap has already loaded. you can get a reference to your featureLayer using something like [responseMap].getLayer("id") Commented Dec 18, 2014 at 17:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.