Closed geohacker closed 4 years ago
@geohacker. we currently have just one style for NearestNode
and a separate style for EditingNodes
. When hovering over an existing way, only the NearestNode
style is used. I do see the id Observe when logging the NearestFeatures
feature collection, so I assume something like the below should be possible. These two approaches aren't working - any suggestions?
const nearestNodes = {
circleColor: { id === observe ? colors.primary : 'white'},
...
}
circleColor: [
'match',
['get', 'id'],
'observe/*', colors.primary,
'white'
],
...
cc @sethvincent
@LanesGood yes, though Mapbox GL doesn't support those wildcard matching. So I just added a new property called membership: no
to distinguish these new nodes. Pushed to the PR and I think it's ready. Thank you!
Closed by #272
Currently we have identical styles for member nodes and new nodes that we are adding + snapping to.
We should have different styles so users can easily snap to existing nodes.
cc @LanesGood