Skip to content

Commit

Permalink
Add map hover + pointer interactivity
Browse files Browse the repository at this point in the history
Refactor to remove react-mapbox-gl dep, since our
use case is simple (just lots of layer declarations)
and the dependency adds complexity and larger bundles.

String geojson feature IDs don't get copied into the
vector tiles, thus can't be used for "feature state":
    mapbox/mapbox-gl-js#2716

Work around just uses osm object id via "promoteId".
It's possible but unlikely that two objects of different
types could share the same int id in a single diff. I
think the behavior in this case is just that both
elements with the same id would receive the same hover state.
The duplicate is likely offscreen.
  • Loading branch information
CloudNiner committed Oct 16, 2020
1 parent 2d3342f commit 2f0900c
Show file tree
Hide file tree
Showing 3 changed files with 384 additions and 211 deletions.
Loading

0 comments on commit 2f0900c

Please sign in to comment.