Skip to content
Breakdance Extended
← All articles

Privacy

Why your map embed needs a click-to-load placeholder

A map that loads tiles on page view sends your visitors’ IP addresses to a third party before they did anything. Here is how Leaflet Maps solves it without a cookie banner plugin.

October 2, 2026 · by Mirko Schubert
Aerial view of an illuminated city intersection at night

Most map embeds start talking to a tile server the moment the page renders. For a visitor in the EU that means their IP address travels to a third party before they clicked anything, and the legal basis for that is thin at best.

What actually happens when a map loads

A tiled map is a grid of small images. Every pan and zoom requests new tiles from the provider, and every request carries the visitor’s IP address and user agent. OpenStreetMap, CARTO and Esri all work this way. None of them are bad actors, but you still have to name them in your privacy policy and you should not contact them without a reason.

The click-to-load pattern

Leaflet Maps renders a placeholder instead of the map. It shows which provider will be contacted, links to your privacy policy and loads the tiles only after the visitor agrees. The choice is remembered per provider in the browser, so returning visitors are not asked again.

  • No request to the tile server before consent
  • The provider is named on the placeholder
  • A generated background, or your own image
  • A global switch for sites that handle consent elsewhere

Accessibility comes for free

The map is a named region, markers are real buttons with the location name, and the zoom controls announce when the limit is reached. Visitors who prefer reduced motion get no zoom or pan animations.

Try it on the Leaflet Maps demo page.