Hi all,
sorry if this has already been covered somewhere else or if is a very
simple question but I can't really find a simple solution.
Ok, here is the problem, I'm quite new to this but, I'm setting up a
Web using PHP and using Google Maps API.
The idea is the following I've several pages which contains the same
kind of information and a map which includes a KML file (specifically
they're mountain bike tracks, the KML file ys the track itself and the
rest of infos are Length, duration, Maximum and miimum altitude and so
on). So I use PHP accessing a MySQL database to get all the
information which include the name of the refrenced KML.
The problem is that each page needs to link a different KML and each
map need to have a different Latitude, longitude and zoom level. So I
have the following piece of code which is included in the <head> of my
php file
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var geoXml = new GGeoXml("http://www.MY_OWN_WEB.com/KML/
20090117.kml");
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(40.69, -3.7948), 12);
map.setMapType(G_HYBRID_MAP);
var mapControl = new GMapTypeControl();
//map.addControl(mapControl);
map.addControl(new GLargeMapControl());
map.addOverlay(geoXml);
}
}
//]]>
</script>
All I need is to find a way to replace the "hardcoded" name of the KML
file and the latitude and longitude with the values I get from the
Database. Well that's it.....I always end up with an empty Map and not
centered at the correct latitude and Longitude (I've checked the
values are corrected in the Db).
Can you please give some advice on how to code this or point me to any
doc or reference to solve this problem. Any help is appreciated.
Thank in advance for the help, Regards,
Simone
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---