Multiple geometry modules
Show different geometries with different modules using different configurations
Everything outside Germany is dimmed, its states are tinted from one palette, and the two state layers trade places as you zoom.
geometryDatareturns the country and its states as boundary polygons, andshowtakes that response unchanged.GeometriesModule.createruns three times on one map. Each instance owns its sources and layers, so their configs never collide.fill: { style: 'inverted' }masks the map around a polygon instead of filling inside it, andfill.opacityaccepts a zoom expression rather than a zoom listener.
Related examples
Delivery zones of your own
Show your own GeoJSON polygons and respond to clicks on them
Customization
Bring Your Own Data
Geometry
User Interaction Events
Web
Traffic incident details
Search a city and render its current traffic incidents, clipped to its boundary, as a developer-controlled overlay
Customization
Traffic
Geometry
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
Basic geometry
Show geometry around the search area
Getting Started
Geometry
Search and Geocoding
Web