I am looking to achieve two things on the map component in Ignition 8.
- I want to access the onClick event for a marker on the map to perform a few simple actions based on which marker was clicked. Map component provides a way to access only the onClick event for the map, not the marker.
- I want to manipulate the color of the marker, essentially to show some kind of status.
Any suggestions on how this can be done?
Currently, there is no way to do this. The map component has yet to be revisited since the conference, but there is plan to do so later this week. I will include your request for features in this plan. --Yousuf
Thanks for the update Yousuf
Do you know if the map component has been reworked now?
I’m currently working on the component at the moment. Your feature request has successfully been added. Each marker has a name property (set by the designer) that is passed along in the marker click event payload. I have also added the corresponding component event called onMarkerClick which you may subscribe to. There are other features that have been added, including:
- onMapClick component event which contains the lat and lng coordinates of the click event
- a new view layer added to the ui layers
- the ability to render views in popups and tooltips
- performance updates
I am hopeful that these changes will become available in the next nightly build.
Thanks for the detailed update Yousuf!
New map component features have just been merged. Should be available in the next nightly build. See change log notes for additions and improvements.
Will there be a way to manipulate the color of the marker or maybe even change the icon?
Yes, there will be. -Yousuf
Hi, Is there way i can assign events for each individual marker clicks?
Right now all makers are having the same scripts.
Give your markers unique names and then you can dispatch to any desired script based on marker name.
Yes. My markers have unique names.
When I configure using right click, configure events; Configuring one marker, configures all markers with the same script.