Hi to everyone!
I have an Imagery Layer and a vertical slider in which I change a parameter to query the layer.
When I have the default renderer everything works fine (e.g. I can see the layer change on realtime on map), but when I change the renderer to a Flow Renderer, the vertical slider changing doesn't work. On the contrary, with the FlowRenderer enabled, I zoom in after I've changed the parameter in the vertical slider, it works.
This is the function triggered by any change in the vertical slider (so changing parameter of the layer):
changeLevelLayer(value: string | number) {
for (const layer of this.layerSelected) {
const whereSplit = layer.mosaicRule.where.split("StdPressure");
layer.mosaicRule.where = whereSplit[0] + "StdPressure = " + value;
layer.refresh();
}
}
As I said, it works fine if there is default renderer but it doesn't work with Flow Renderer.
How can I handle it? Is there any Known limitation?
Thank you so much!
Solved! Go to Solution.
Hi there,
I do see the behavior you describe. You can workaround this issue by cloning the layer's mosaicRule, make the changes to the cloned mosaicRule then assign the mosaicRule back to the layer's mosaicRule as shown below:
const where = "StdTime = " + `date'${whereDate}'`;
let rule = layer.mosaicRule.clone();
rule.multidimensionalDefinition = [];
rule.where = where;
layer.mosaicRule = rule;
Hi there,
I do see the behavior you describe. You can workaround this issue by cloning the layer's mosaicRule, make the changes to the cloned mosaicRule then assign the mosaicRule back to the layer's mosaicRule as shown below:
const where = "StdTime = " + `date'${whereDate}'`;
let rule = layer.mosaicRule.clone();
rule.multidimensionalDefinition = [];
rule.where = where;
layer.mosaicRule = rule;
Thank you so much! Great workaround 😉