Mixed User Interaction Events

Handle various map events and user interactions

View on GitHub
SDK 1.0.0-rc.7

Three surfaces answer the pointer: a pharmacy pin opens its details, dwelling on a traffic incident reveals its delay, and a click on bare map returns the address underneath.

  • events.places.on('click', …) hands back the clicked Place, the object discoverPlaces returned and PlacesModule.show drew, not a raw layer feature.
  • long-hover on TrafficIncidentsModule is a dwell event, so the popup needs no timer of its own.
  • BaseMapModule covers the style’s own features, so reverseGeocode runs only on clicks that landed on the map itself, not on a pin.

Related examples