Changing default zoom in Google embedded map?
I am having difficulties to change the default zoom level when I open the iframe below in my site. Can anyone please help me to set zoom level when following iframe is opened?
<iframe src="http://mapsengine.google.com/map/u/0/embed?mid=zYk_BmXXTdxw.k83snDbX5SJc" width="745" height="480"></iframe>
This is the newest version of Google Maps.
Have you tried to save the map in Maps Engine with the desired zoom level?
This FIX not working, but the old google maps is not aviabile. How embedded the new google maps???? thank you.
it seems you can use a
&zoom=nnparameter now Try this:
<iframe src="http://mapsengine.google.com/map/u/0/embed?mid=zYk_BmXXTdxw.k83snDbX5SJc&zoom=9" width="745" height="480"></iframe>
As Chryss said, setting default zoom level doesn't yet seem to be possible in the Lite version of Google Maps Engine.
It is, however, possible with a free account at full Maps Engine (Google Maps for Business), but that's a whole other animal to work with and takes a bit getting used to.
If you don't want to dive into that quite yet…
New Google Maps still lets you "Return to Classic Maps", so if you want to go that direction with a simple map, you don't need to export, open etc. Just switch back temporarily, create your map there, and get the "classic" embed code, with zoom levels and everything.
However, I didn't much like the solution of going back to the old maps, so I chose another inelegant workaround:
- Add another layer to your map.
- Add some points of interest in a radius that roughly corresponds to the zoom level you want. (E.g. for the B&B site I was making, I added a layer of Major Airports)
- Uncheck the new layer, to make it invisible.
- Embed the map.
The embedded map should then be zoomed out to get all locations in the map, even if the layer they're on is turned off by default.
Of course, the user can simply check the box to show the hidden layer, but if you make that layer useful or relevant, that doesn't have to be a big problem.
This doesn't appear to be a feature of Map Engine Lite (the new embed API for one's own maps).
However, there seems to be a workaround for the time being, though I imagine they may do away with it at one point:
- Create your map in Map Engine Lite
- Choose "Export to KML", checking the box "Keep data up to date with network link KML", and download the resulting KML file
- Open the KML file in a text editor and retrieve the KML live URL, which looks something like http://mapsengine.google.com/map/u/0/kml?mid=z6Uzj8KqhwOk.khdrFbiM_Bstf
- Go back to Google Maps > My places and paste this URL in the search box . At this stage, right now, you have the old embed controls still available, so:
- Click on the chain-link "Share" icon, clicking back and forth between "Customize and preview embedded map" and your map itself until the result is to your liking, including zoom factor.
- Copy the resulting HTML code (iframe).
The main limitation of this, maybe a dealbreaker, is that the embedded map will be using the old embedded map style.
I couldn't find the URL from mapsengine.google.com.....you posted on the reply. I opened the KML file with text editor but there are no links at all.