how do i add a map without the cookie banner and the lag

web · 2026-10-07 · 3 min

a map on a website is almost always an iframe from google maps or openstreetmap, pasted into the page with an address. it takes two minutes. the two things that make it a problem are weight and cookies: the google embed loads a lot of javascript and sets cookies, which in the eu means it should wait for consent.

the embed

in google maps, search the address, choose share, then embed a map, and copy the iframe. on openstreetmap the share panel does the same with no account. paste it where you want it and set a width of 100 percent with a fixed height, around 300 to 400 pixels on desktop and less on a phone. check the pin: a shop on a pedestrian street often lands on the nearest road, and the fix is to move the marker by hand before copying.

the lighter version

most sites do not need an interactive map above the fold. a static image of the map, linked to google maps directions, weighs a few dozen kilobytes and opens the real app on a phone, which is what people want anyway. the other good option is text: the full address, a note about parking, and a link that opens directions. that paragraph is also the part google reads when someone searches for the street.

what goes wrong

the map is the largest element on the page and pushes the actual content below the screen. the iframe has no title, so screen readers announce an unnamed frame. the address in the text does not match the pin, which confuses both visitors and search. and the embed loads before consent, which is a small problem that becomes a large one the day someone complains.

faq

is the google maps embed free?

yes, for the basic embed used on a website. the paid apis are for developers who draw maps or calculate routes inside an application, not for showing one address. you do need to accept google's terms, which include tracking.

does a map help local seo?

not directly. google reads the address on the page and your business profile, not the iframe. the map helps the human who is already convinced and wants to know where to park.

can i avoid the cookie banner with a map?

use openstreetmap, which sets fewer cookies, or a static image with a link. the cleanest is to load the iframe only after a click on a placeholder, so nothing third-party runs until the visitor asks for it.