Changing the zoom level on an embedded Google Map

lisa Lisa, 18th December 2014

I love Google products, but they change more often than I change my socks!

Which means you constantly need to learn how to use their products to get the best out of them.

The latest example of this was updating a Google Map embedded on a client's site. I made the map many moons ago and so I simply went into "My maps" (and option which comes up if you click in the search box on maps.google.com whilst logged into your Google account) and edited the pointer.

However, when I retrieved the embed code (by clicking on the little folder icon on the left of the screen) and added it to the site, the map was incredibly zoomed in, even though it wasn't on the map I'd prepared in Google. You used to be able to preview your embed and set the zoom level, but not any more (I've heard something that suggests you might be able to in a premium business version, but the option doesn't seem to exist in the regular version any more).

So a bit of Googling later and I found a solution on stackexchange which worked for me. But - it might not work forever, as Google is constantly changing!

The embed code you get now includes a link to mapsengine.google.com. You need to add z=15 to the end of this to change the zoom level.

So this:

https:// mapsengine.google.com/map/embed?mid=zzRw9pj0Hv4M.kTl1AjAeN384&" width="640" height="480"

Becomes:

https:// mapsengine.google.com/map/embed?mid=zzRw9pj0Hv4M.kTl1AjAeN384&z=15" width="640" height="480"

The result of that map then looks like this:


15 was the example in the thread I read, so just to see which way it worked I then tried a map with z=5, and I got the following:

So the smaller the number, the more zoomed out the map.

I'm not sure how long this fix will work for, but it does the job at the moment!


More from our blog

18a win Netty 2024 award for Activibees.com

18a win Netty 2024 award for Activibees.com

29.02.24

We are delighted to announce that 18a has been recognised for its outstanding work in the "Web Design Agency of the Year - UK" category at… Read →

Generating an Effective Content Security Policy with your Laravel React App

Generating an Effective Content Security Policy with your Laravel React App

27.02.24

I recently had an interesting problem to solve. I'd built a brand new author website on a shiny installation of Laravel 10, utilising its out-of-the-box… Read →

If your WordPress website looks broken, it could be because of this.

If your WordPress website looks broken, it could be because of this.

15.02.24

WordPress is the incredibly popular blogging-come-full-website platform that powers over 835 million websites* in 2024. It's functionality is extended by plugins, and one such very… Read →