-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace symbol/marker when clicked on it #3021
Comments
Currently the only way to hide the symbol in this case is to remove it from the GeoJSON source and call |
Alternative you can try using the new DOM markers functionality ( |
It's not very clear to me when to use the symbol layer functionality and when to use the mapboxgl.Marker functionality. What are the odds and benefits of each method ? It would be nice to be able to change the symbol of a GeoJSON point in the future. |
@uhuru-be general rule of thumb is to use a symbol layer when you have tons of points that don't change often, and to use HTML markers when you have a few points that are animated/changed frequently or need the rich HTML styling. |
Thanks. Then I guess I stick to the symbol layer because some maps have hundreds of symbols and wait for the new feature. |
@uhuru-be DOM markers are OK for 100-200 markers. It becomes a performance problem when it's 500 or more. |
Hello,
I have a map where symbols ("markers") are added to a symbol layer using a geojson source. When moving over a marker (or clicking on it) a little popup is shown with a title, photo and description.
Now, I would like to replace the symbol when user clicks on it, so that the user sees instantly which symbols he has already checked.. What is the best way to accomplish this ?
The text was updated successfully, but these errors were encountered: