Interactive roads and numbers

Base Map with interactive roads and house numbers.

View on GitHub
SDK 1.0.0-rc.7

Hovering picks out the road under the cursor. Clicking holds it, dims what surrounds it and resolves an address at each end of the segment.

  • BaseMapModule.get hands over the style’s own roads, labels, shields and house numbers as one event surface, with no layer ids to track down.
  • events.where({ layerGroups }) splits that surface into the part worth exploring and the rest, each scope carrying its own hover cursor.
  • The handler receives the clicked geometry, so reverseGeocode turns its endpoints into street addresses.

Related examples