-
Notifications
You must be signed in to change notification settings - Fork 1
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
Paint by county #74
Paint by county #74
Conversation
paint: { | ||
"fill-color": "#fff", | ||
"fill-opacity": 0, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of an ugly hack for queryRenderedFeatures
to work but was fine with it.
paintFunction: getFeaturesInBbox, | ||
setPaintFunction: (paintFunction) => set({ paintFunction }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using this pattern made it really easy to handle different behaviors on hover without messing with map events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good to me
Description
Discussion
querySourceFeatures
using an expression that slices the first five chars in thePath
. In that case the geometry-based approach is more of a fallback but nice-to-have.Reviewers
Checklist
Screenshots (if applicable):
output.mp4