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