-
Notifications
You must be signed in to change notification settings - Fork 592
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
How to change the initial custom styling of a feature after we draw it? #1298
Comments
I also want to achieve the color change problem, but I change it when drawing a new line |
I also have a requirement, which is to add serial numbers to the drawing points, such as 123 in your video. I would like to ask whether you use external labels to implement it or implement it in draw. If you implement it in the draw plug-in, how to implement it? |
I found the following solution sameerabit answer |
Hi everyone,
In the image below I draw roofs on the the top of the building:
This how I draw the roof :
I created a map instance :
I defined the styles using this function:
Everything works as expected but when I click on the roof ID ( circle ID), I want to change the color of that selected roof (feature) to red but Mapbox gl does not influence the change:
c0c91e36-12f5-43ea-8ed6-f3ce538f93c3.webm
This is the method I use:
I did not understand how to use the property
userProperties
Is it possible to change the color of each feature?I appreciate any example that you can provide.
Example: drawing to polygons in the first rendering and when I click on one of them, it will change its color.
Thank you
The text was updated successfully, but these errors were encountered: