Interactive map labels
Click country, city and neighborhood labels on the map to show their boundaries
Click a country, city or neighbourhood label and the map outlines the area it names and dims the rest.
BaseMapModule.getowns the style’s own labels, andevents.where({ layerGroups })splits them from the rest of the map, each scope carrying its own hover cursor.- The handler gets the label feature, so its name feeds
discoverPlaceswith the geography types to keep, so there is no reverse lookup. GeometriesModule.createwithfill: { style: 'inverted' }shades the world outside the polygongeometryDatareturns, andcleartakes it away.
Related examples
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
Mixed User Interaction Events
Handle various map events and user interactions
Getting Started
Base Map
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