If you’ve seen my display KML on a google map page you’ll know that it doesn’t automatically zoom up on your generated markers. That’s cause I thought it was too hard and crazy to implement.

Turns out I was wrong.

If you’re populating a google map with data from a KML file, you can automatically centre and zoom to the right place just by adding this line of code:


Where geoXml is your GGeoXml object and map is your GMap2 object.

How easy is that?!

Need to find a lawyer for your business? Get in touch with my company Lexoo and we'll find you a great one for free.