Reputation: 6007
I readed many question, map help, product forums and so on... but I never find the answer just this "It is not possible". I can't believe it.
So how can I set the default zoom level on an embed Google Map?
Now I have this link for my map: https://mapsengine.google.com/map/edit?mid=zV4QqQ0y5KZs.kFj05lIIpS5s
I was tried thi z=10
parameter in the URL, it doesn't work. Is there any other parameter, or maybe something JavaScript
tricks to set up the zoomlevel? Or something other HTML parameter like data-zoom
or something...?
Upvotes: 10
Views: 44454
Reputation: 651
It seems the &z=nn
parameter now works.
Try this:
https://mapsengine.google.com/map/viewer?mid=zV4QqQ0y5KZs.kFj05lIIpS5s&z=10
Upvotes: 11
Reputation: 21
The new embedded google maps do not have the Z index more, you have to first set the zoom level you want on the google maps site, and afther that click on the setting button and get the iframe code for the zoomed map. You can not change the zoom level in the setting window, that is why you have to zoom the map first directly in the google maps.
Than paste this code in your html page and it should work, at least this worked for me.
Upvotes: 2
Reputation: 516
I use this code to initialize my map:
var map;
function initialize() {
var mapOptions = {
zoom: 6,
center: new google.maps.LatLng(40, -3),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
That's centered in Spain.
Upvotes: 6