5

I'm trying to use this map in a website and I am using the next piece of HTML code to add it.

<iframe src="https://www.google.com/maps/d/embed?mid=zkqAm4_X6ia8.kj6iIDUiDRdc&hl=es" width="640" height="480"></iframe>

My problem is that I want the embedded map to show the Utrecht area only, but I can't figure out how to change the center of the embedded map. I know that the parameter z= will set the zoom level. I've tried the center= parameter as specified in the documentation, but it does not seem to work

https://developers.google.com/maps/documentation/embed/guide#optional_parameters

does anybody how to set the center?

Thanks in advance!

SalmonKiller
  • 2,183
  • 4
  • 27
  • 56
Trees
  • 53
  • 1
  • 1
  • 3

4 Answers4

20

you can pass the lat and long by adding &ll=LAT, LONG

ex:

&ll=40.7127, -74.0059

Just add it to the end of the link in src

<iframe src="https://www.google.com/maps/d/embed?mid=zkqAm4_X6ia8.kj6iIDUiDRdc&hl=es&ll=40.7127, -74.0059" width="640" height="480"></iframe>

FIDDLE

jmore009
  • 12,863
  • 1
  • 19
  • 34
  • Thanks! That's exactly what I needed. For more parameters: http://asnsblues.blogspot.com.es/2011/11/google-maps-query-string-parameters.html – Trees Jan 02 '15 at 11:09
1

You can pass the lat lang to the iframe src attribute like center=lat,lng if you are using google EMBED.

MOHD TAHIR
  • 151
  • 1
  • 1
  • 11
0

I am using below for map options

 center: new google.maps.LatLng(12.1, 122)

I had to experiment with variations of LatLng to get the desired centered position,

agentpx
  • 1,051
  • 1
  • 8
  • 24
0

maybe this can help width="100%" height="600, I inserted a google map and when i change the screen length the map will adjust depending of the screen you see the map and the pointer will be in the center always hope it helps you.