Geometries playground
Display multiple geographic geometries with different configurations
Pick a region set and each subdivision comes back shaded from that set’s own colours. Swap in another palette, or switch the palette mode between taking the colours in turn and ramping through them. Pick a layer position and the set slides up or down the base map’s stack.
geometryDatatakes thegeocoderesponse itself as its input, andGeometriesModule.showdraws the polygons it returns with no source or layer of your own.applyConfigtakes a list of CSS colours asfill.paletteand hands them to the features in turn, so you never assign a colour per feature. Withfill.paletteModeset to'ramp', as Chicago’s postcodes start, they blend instead: two colours shade every postcode between them, and a middle colour is a stop the ramp passes through.updateConfigwith abeforeLayerConfigre-seats the geometry layers under roads, labels or buildings without re-fetching or re-showing anything.
Related examples
Geometry config playground
Style a place's geometry
Playground
Geometry
Web
Geometry search playground
Search for places within specific geographic boundaries
Playground
Search and Geocoding
Geometry
Web
Places by category in words
Name a kind of place in one of five languages and find it inside the Paris outline
Playground
Search and Geocoding
Geometry
Web
Map Chat Agent
Ask a chat beside the map for places, routes or traffic, and watch the map search, draw and frame the answer
Playground
AI
Search and Geocoding
Places and POIs
Map Style
Base Map
Geometry
Traffic
Routing
Plugins
Web
React