Kymera Maps Icons Visibility

Hello,

I have been playing with Kymera Maps Panel Module and here are some doubts/questions about it
I would like to implement visibility in my datapoints (icons). At the moment I could only change visibility of the labels by executing some code with two buttons, one button shows the label and the other hides it. Is there anyway to change visibility of my icons? The purpose of this is to have for example 3 or 4 buttons that when I click on some of these it shows different data points like if you were playing with layers. Also, I would be grateful if you had some manual about Kymera Map Panel Module where I can find more examples about code and functionalities.

Regards!

@Kyle_Chase should be able to get you more info

In order to hide/show a specific set of icons from the datapoints dataset, you can write an expression with condition and set it on points using setIconExpression(String expression) method. For a datapoint not to be visible, use a transparent png. you can download the one attached here and upload it through Image Management.

Below is the example of the code you can write on the click of a button:

mapPt = event.source.parent.getComponent(ā€˜Map Panelā€™).mapPoints
for point in mapPt:
point.setIconExpression(ā€œif(1,ā€œMapPanel/red.pngā€,ā€œMapPanel/transparent.pngā€)ā€)

*Replace 1 in the if condition with condition of your choice.
The above example will set the icon to be ā€œMapPanel/red.pngā€ if condition is true otherwise it will be set to ā€œMapPanel/transparent.pngā€ which will be a hidden icon.

You can get the manual for the Map Panel version you are using from the documentation link of your installed module,
Go to Configure section in ignition, then to Kymera Map Panel Module, you will find a button named ā€œMoreā€ there, under it is Documentation link.

1 Like