With the feature Load map only after consent, Mapfolk contacts no map service until the visitor agrees, while the list and the filters already work. Until then the placeholder shows a preview with the markers and the button Load map; for this it fetches nothing from another server. A click on the button loads the map for that page view; consent in the cookie banner loads it without a click.
Switch on the feature
- Open Mapfolk, Settings, tab Features.
- Under Map, switch on Load map only after consent and click Save features.
With Google Maps (Pro), the feature switches itself on as soon as the map changes to Google. You can switch it off again here.
Complianz
Mapfolk reads consent from Complianz directly; no other plugin is needed. Only what Complianz has stored after a choice in the banner counts as consent; before that, the map does not load.
Mapfolk asks for the category functional for a map on OpenStreetMap and for marketing for a map on Google Maps. As soon as Complianz stores consent for that category, the map loads without reloading the page. Complianz stores functional as accepted with every choice in the banner, including Deny, so a map on OpenStreetMap loads after any choice.
Other cookie banners reach Mapfolk through the WP Consent API, with the same categories and only when a consent type is set.
Borlabs Cookie and Real Cookie Banner (Google Maps, Pro)
For both plugins, Mapfolk checks consent for one service by its ID. These IDs exist only for maps on Google Maps. On a map with OpenStreetMap, the visitor loads the map with Load map.
- In your cookie banner, set up a service for Google Maps and note its ID. In Real Cookie Banner, the ID is the unique name of the service.
- Open Mapfolk, Settings, tab Services, with Google Maps as Service.
- Enter the ID in Service ID in Borlabs Cookie or Service ID in Real Cookie Banner. Mapfolk prefills
googlemapsfor Borlabs Cookie andgoogle-mapsfor Real Cookie Banner; change the value if your service has a different ID. - Click Save services.
With Borlabs Cookie, Mapfolk uses the JavaScript API of Borlabs Cookie 3 and loads the map as soon as the visitor saves their consent.
Check it
- Open the page with the map in a private window. The placeholder with the markers and Load map appears, the list is already there.
- Agree to the service or category in the banner. The map loads without a reload.
Why Google Maps needs consent at all is explained in the blog post loading Google Maps after cookie consent. Setting up the key and Map ID is covered in Google Maps with key and Map ID.
Back to the documentation