Mixed User Interaction Events
Handle various map events and user interactions
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 clickedPlace, the objectdiscoverPlacesreturned andPlacesModule.showdrew, not a raw layer feature.long-hoveronTrafficIncidentsModuleis a dwell event, so the popup needs no timer of its own.BaseMapModulecovers the style’s own features, soreverseGeocoderuns only on clicks that landed on the map itself, not on a pin.
Related examples
Interactive map labels
Click country, city and neighborhood labels on the map to show their boundaries
Getting Started
Base Map
Geometry
User Interaction Events
Web
Interactive Map POIs
Click on map POIs to see their details
Getting Started
Base Map
Places and POIs
User Interaction Events
Web
Interactive roads and numbers
Base Map with interactive roads and house numbers.
Getting Started
Base Map
Search and Geocoding
User Interaction Events
Web
Interactive base map buildings
Hover, click and paint single 3D buildings of the base map in Midtown Manhattan
Customization
Base Map
User Interaction Events
Web