Services Plugins FAQs

Mapbox Map : Change Icon On Marker Click

Is there a way to change marker icon or any of its attributes when a marker is clicked? I need to differentiate which markers have been clicked when there is a big list of them rendered on the map.

Also looking for a way to either disable the description popup on marker click, as well as show a custom popup on ouse hover of marker?

Thanks in advance for any help. I am really stuck and unable to proceed further with my use case,

Hey @barijit ,
Thank you for contacting us and sorry for the long wait due to the weekend.

You can achieve the behavior you’re looking for with the following steps:

  1. Changing Marker Icon on Click:
  • We have an event called Marker Clicked that triggers when a marker is clicked.
  • When the event is triggered, you can remove the existing marker and add a new one with a different icon.
  • It’s recommended to add the new marker first and then remove the old one to avoid any visual gap (about 0.5 seconds) on the map.
  1. Disabling the Description Popup:
  • To disable the default popup that appears when you click on a marker, simply do not provide a description field when creating the marker. If you leave the description empty, the default popup will not appear.
  1. Custom Popup on Hover:
  • Unfortunately, we don’t have an event for mouse hover over the marker at this moment. So, adding a custom popup on hover is not possible through this plugin as of now.

Have a nice day!

Best Regards,
Anton

Browse all Zeroqode Plugins for Bubble
Banner_Last3

Hi Anton, in a different thread a response was given about the “Display popup on hover” action: https://forum.zeroqode.com/t/marker-hover-popup-on-a-mapbox-bubble-map/15707
Is that referencing something different, since you say displaying a custom popup on hover is not possible? I have tried using that action and couldn’t get it to work in any case.