You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to figure out how to add a rectangular marker that contains some dynamic data, in this case a housing price. I'm trying to achieve this using layers instead of a custom Marker. The reason is that I need to display a popup on hover, and as far as I can tell, Markers only display a popup on click.
You can see an example of creating custom Markers here. The Marker class also exposes a togglePopup method which you can use in a hover listener to open and close the attached popup.
mapbox-gl-js version: 0.46
Question
I'm trying to figure out how to add a rectangular marker that contains some dynamic data, in this case a housing price. I'm trying to achieve this using layers instead of a custom Marker. The reason is that I need to display a popup on hover, and as far as I can tell, Markers only display a popup on click.
I need the price tag to look something like this: https://i.stack.imgur.com/7wl5O.png
I've combed through the documentation and Google, but I have not found an answer. Please help.
Links to related documentation
https://www.mapbox.com/mapbox-gl-js/example/data-driven-circle-colors/
https://www.mapbox.com/mapbox-gl-js/example/data-driven-lines/
https://www.mapbox.com/mapbox-gl-js/example/display-and-style-rich-text-labels/
The text was updated successfully, but these errors were encountered: