CMS MADE SIMPLE FORGE

gMapsKML

 

[#9907] Maps showing a KML file point zooms to max

avatar
Created By: David Bannon (dbannon)
Date Submitted: Wed Mar 19 04:41:35 -0400 2014

Assigned To:
Version: None
CMSMS Version: 1.11.10
Severity: None
Resolution: None
State: Open
Summary:
Maps showing a KML file point zooms to max
Detailed Description:
Hello Morten,

Not sure if this is a bug report or a feature request ?

I recently used function_gmapskml to show a map on a web page. I wanted a
pointer highlighting a specific location, (our club rooms). However, as it was
just a point, the map zooms to max. Not what most users want.

Answer is to set location and zoom, then call KmlLayer() with the 
preserveViewport option set to true.

I have a version working to suit my needs ( http://gembendigo.org.au/cms ) but
my PHP is not up to doing it properly. Would you like to see my attempt ?  You
will probably fix my problem or see a more elegent way of achieving what is
needed.

My working version strips out all the things I don't need so won't really help
you...

Let me know if you want to see my failed attemp, its almost all done. Sigh !

David



History