0

Built a layer list widget using web-app builder and integrated it with our Spring application.

I'm trying to pass state parameter to layer definitions through the following code:

this.operLayerInfos._operLayer.layerObject.layerDefinitions=["STATE IN ('CA')"];
this.operLayerInfos._operLayer.layerObject.supportDynamicLayers = true;
this.operLayerInfos._operLayer.layerObject.disableClientCaching = true;

This is not reflecting in the map.

1
  • Im stuck. Can someone help?
    – nandhini
    Commented Jun 15, 2017 at 7:22

1 Answer 1

0

Following code worked.

var ldefs = [];

array.forEach(operLayer.layerObject.layerInfos, function(layerInfo)){
    ldefs.push("STATE IN ('CA')");
}, this);

operLayer.layerObject.setLayerDefinitions(ldefs);
operLayer.layerObject.supportDynamicLayers = true;
operLayer.layerObject.disableClientCaching = true;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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