-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Putting this aside until I can debug what's going on.
-
Need a way to set promoteId to something unique, e.g. "name"
-
Set hoverstate:
map.on('mousemove', 'states', (e) => {
if (e.features.length > 0) {
if (hoveredStateId) {
map.setFeatureState(
{source: 'states', id: hoveredStateId},
{hover: false}
);
}
hoveredStateId = e.features[0].properties.name;
map.setFeatureState(
{source: 'states', id: hoveredStateId},
{hover: true}
);
}
});
map.on('mouseleave', 'states', () => {
if (hoveredStateId) {
map.setFeatureState(
{source: 'states', id: hoveredStateId},
{hover: false}
);
}
hoveredStateId = null;
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels