Hello i have a Big Problem :

I would like on this site:

http://www.covoiturage.fr/carte

I have a xml file with lat and long and I would like to have a
line between the 2.

javascript :

 var urlstr = "../../html/scripts/data.xml";
       GDownloadUrl(urlstr, function(data) {
         var xml = GXml.parse(data);
         var markers = xml.documentElement.getElementsByTagName
("marker");
         for (var i = 0; i < markers.length; i++) {
                  var polyline = new GPolyline([
   new GLatLng(parseFloat(markers[i].getAttribute("lat"))),
   new GLatLng(parseFloat(markers[i].getAttribute("lng")))
], "#ff0000", 10);
map.addOverlay(polyline);

         }
       });


xml :

<?xml version="1.0" encoding="UTF-8"?>
<markers>
<marker lat="47.391174" lng="0.722265" type="alpha" nom="Société Zeus"
adresse="avenue de le République" codepostal="37700" ville="Saint-
Pierre-des-Corps"/>
<marker lat="47.417692" lng="0.691023" type="alpha" nom="Société Gaïa"
adresse="avenue Maginot" codepostal="37100" ville="Tours"/>
<marker lat="47.382602" lng="0.726686" type="alpha" nom="Société Éros"
adresse="rue Grands Mortiers|ZA Grands Mortiers" codepostal="37700"
ville="Saint-Pierre-des-Corps"/>
<marker lat="47.382602" lng="0.726686" type="bravo" nom="Société
Héméra" adresse="rue Gustave Eiffel|Z.I. N° 1" codepostal="37300"
ville="Joué-les-Tours"/>
<marker lat="47.419094" lng="0.693244" type="alpha" nom="Société Nyx"
adresse="avenue Andre Maginot" codepostal="37100" ville="Tours"/>
<marker lat="47.419972" lng="0.662138" type="alpha" nom="Société
Érèbe" adresse="boulevard Charles de Gaulle" codepostal="37540"
ville="Saint-Cyr-sur-Loire"/>

</markers>

it doesn't work.
Sorry for my english , I'm french

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