2

The KML file is loading correctly (i.e. I can see the marker correctly), however what I wanted is to see map to be more "zoomed out" upon load. How will I do that?

Thanks!

Brandon Young
  • 523
  • 2
  • 8
  • 19

1 Answers1

2

Look at this page: KML / Google Map - Specifying the zoom level of an embeded map in an iFrame

The answer is from MikeD:

"You can control Google Map's display behaviour by the arguments you pass in the src of the iframe element - in your case by setting the "z" parameter - see here

simply make your iframe source as "http://maps.google.com/?ll=48.064372,16.348977&z=10" and change z=10 to any other higher (up to 20) or lower value (down to 0)

Alternatively, in the Maps API you would use the setCenter() function to set the zoom level"

Hope this is help you !

Community
  • 1
  • 1
John Smith
  • 808
  • 3
  • 9
  • 20
  • Well, i'm not sure that you can do it in the KML file... take a look at the documentation: http://code.google.com/intl/fr-FR/apis/kml/documentation/kmlelementsinmaps.html – John Smith Feb 08 '12 at 10:33
  • but the link that you gave does not include the zooming function. But anyway, thanks for the time.. i hope somebody can be able to help me – Brandon Young Feb 08 '12 at 10:42
  • Brandon: Did you find this link: ? http://stackoverflow.com/questions/8187837/google-maps-zoom-gets-over-riden-when-using-a-kml-file – John Smith Feb 08 '12 at 10:55
  • yes and i already got the answer.. it think it is natural/automatic for the maps to be displayed to be zoomed in/out as to cover all the areas of the markers.. so the farther the markers get, the more zoomed out the map is. thanks! – Brandon Young Feb 08 '12 at 12:04