Center a google map

62 views
Skip to first unread message

George Kashouh

unread,
Mar 2, 2014, 2:33:48 PM3/2/14
to kml-support-g...@googlegroups.com
I feel like this is the most absolute basic function of any map, but no where can I find any information on it online.

All I want to do is create a google map where I choose the center and set the zoom. Right now the map is centering and zooming itself depending on the markers and border regions I have added. I want this all to be completely ignored and I want the default view to be my own choosing. Anyone know how to do this? Thanks!

barryhunter (KML Guru)

unread,
Mar 5, 2014, 1:07:05 PM3/5/14
to kml-support-g...@googlegroups.com
Where is this map? What technology is it built on? 

We have no prior knowledge of your implementation. 

smh

unread,
Mar 6, 2014, 6:18:18 PM3/6/14
to kml-support-g...@googlegroups.com

See the LookAt KML element documented here:

https://developers.google.com/kml/documentation/kmlreference#lookat

If there is no LookAt in the KML, GE computes a default view based on the rest of the KML.
An easy way to generate a LookAt is to load your original KML 
document into GE, manually adjust the view to be what you want, then
File->Copy the current view, and paste that into your favorite text editor.
 Find the <LookAt> element and copy it into your original document.  Even
easier, you can simply File->Save the current view as an entire kmz file.

The precise boundaries that will be displayed when the resulting KML is
loaded into a different GE with a different screen or window size may be
larger or smaller, depending on how much space is available and details
like  whether that local GE is displaying the side panel, but the center
and viewing angles will be what you specified.

HTH

George Kashouh

unread,
Mar 6, 2014, 6:21:39 PM3/6/14
to kml-support-g...@googlegroups.com
Thanks for your reply. An example of the map is here: www.travelthewholeworld.com/traveling-indonesia . I'm using wordpress and the map is not a plugin, but part of the WP Traveler theme. So here on the link I sent you the map is fine, but I'd like to add other markers or POIs outside of Indonesia so that if a user is curious about something nearby they can access it from the map, rather than going to the home page and looking for the country. If I had any other POIs then the zoom and the center will adjust for it, but I'd like it to stay as it looks now.
Reply all
Reply to author
Forward
0 new messages