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.

  • Im stuck. Can someone help? – nandhini Jun 15 '17 at 7:22
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, privacy policy and cookie policy

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