Hold map requests
Hold the map's tile requests behind a toggle, then release them
Turn the hold on and pan: the held tiles pile up in the panel and the edge you uncover stays blank, until you turn the hold off and they load.
transformRequestgets each request once the SDK has built it, URL, headers and credentials included, so the hook only decides when it goes.- Returning a promise holds the request on the main thread, before MapLibre’s workers fetch the tile, the same way you wait for a proxy session.
- The hook stays in place through
setLanguageandsetGeopoliticalView.
Related examples
Attribution playground
The map's copyright logos in any corner, clear of your app's own panels, on every standard style
Playground
Base Map
Web
Geopolitical views playground
Fly to a disputed territory and see its borders, names and address from each country's view
Playground
Base Map
Search and Geocoding
Web
Layer group toggling
Control individual base map layer groups
Playground
Base Map
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