HI, i have read all the day forums to solve my code.

I started with googlemaps, i put a code from many tutorials, and i
make my KML file from my database (http://
mdqcalles.agustinvinao.com.ar/kml_recorrido/532) and i get my kml
file.

But in my script code when i load my KML file doesn't load this KML.

I tes my KML file over maps.google.com and i get an error, the file
isn't a valid KML o KMZ file.

I put in my .htaccess file:
AddType application/vnd.google-earth.kml+xml .kml
AddType application/vnd.google-earth.kmz .kmz

My code is very simple:
     google.load("maps", "2");
      function initialize() {
        var map = new google.maps.Map2(document.getElementById
("map"));
        map.setMapType(G_NORMAL_MAP);
        map.setCenter(new google.maps.LatLng(-37.980164,-57.589602),
13);
        var marker = new GMarker(new GLatLng(-37.980164,-57.589602));
        map.addOverlay(marker);
        map.addControl(new GLargeMapControl());
        map.addControl(new GScaleControl());
        map.addControl(new GMapTypeControl());
        map.addControl(new GOverviewMapControl());
        var url_kml='http://mdqcalles.agustinvinao.com.ar/
kml_recorrido/532/'+ Math.round(Math.random() * 10000000000)+'.kml';
        var geoXml = new GGeoXml(url_kml);
        map.addOverlay(geoXml);
      }
      google.setOnLoadCallback(initialize);

In my php code i set the header:
header("Content-type: application/vnd.google-earth.kml+xml");


I don't know what happend and how to solve it.
Thanks

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to