Here is my page... <html> <head>
<script src=" http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAGM9hsSSHI9ponomlyRSD0BSPvBRG01H7N9JfL9opkdBwSKcnjhRTuSsc8WmRIwu8LvVzKMp9N82tRQ " type="text/javascript"></script> <script type="text/javascript"> //declaration des variables var map = null; var gdir; var geopoints = new Array(); geopoints[0] = <?php echo 48.892995 ?>; geopoints[1] = <?php echo 2.23769 ?>; var depart = geopoints[0]+","+geopoints[1]; var arrivee = <?php echo "\"Paris\"" ?>; var step = ""; var texte = ""; //street view variables var panorama; var panorama2; var geocoder = null; var point_depart = new GLatLng(geopoints[0],geopoints[1]); function load() { if (GBrowserIsCompatible()) { //Creation de la carte map = new GMap2(document.getElementById("map")); gdir = new GDirections(map); //Gestion des erreurs GEvent.addListener(gdir, "error", handleErrors); //Creation de l'itineraire * gdir.loadFromWaypoints([depart,arrivee],{getSteps:true, travelMode:G_TRAVEL_MODE_WALKING}); * //Récuperation de l'itineraire GEvent.addListener(gdir,"load", function() { var groute = gdir.getRoute(0); * step = groute.getSummaryHtml()+ "<br><br>"; for ( var i=0; i < groute.getNumSteps(); i++ ) { step += groute.getStep(i).getDescriptionHtml()+ "<br>"; } document.getElementById("itineraire").innerHTML = step; }); * //methodes street view panorama = new GStreetviewPanorama(document.getElementById("streetDiv")); panorama.setLocationAndPOV(point_depart, {yaw:0}); //Coordonnees en fonction de l'adresse d'arrivee geocoder = new GClientGeocoder(); geocoder.getLatLng (arrivee, function(point) { if (!point) {alert("adresse non trouvee");} else { panorama2 = new GStreetviewPanorama(document.getElementById("streetDiv2")); panorama2.setLocationAndPOV(point, {yaw:0}); } }); } } </script> </head> <body onload="load()" onunload="GUnload()"> <div style="font-size:20px"><strong>Geolocalisation</strong></div><br/> <!--DIV qui contiend la carte!--> <div id="map"></div> <br/> <!--DIV qui contiend l'itinéraire!--> <div><strong>Itineraire</strong></div> *<div id="itineraire"></div><br/>* <!--DIV qui contiend street view depart!--> <div><strong>Depart</strong></div> <div id="streetDiv"></div> <br/> <!--DIV qui contiend street view arrivee!--> <div><strong>Arrivee</strong></div> <div id="streetDiv2"></div> <br/> <!--DIV qui contiend la carte static <div id="staticMapIMG"></div>!--> </body> </html> On Tue, Dec 30, 2008 at 11:09 AM, warden [Andrew Leach - Maps API Guru] < [email protected]> wrote: > > On Dec 30, 10:06 am, Maxime Schacht <[email protected]> wrote: > > Hello, > > > > i'm having trouble when i try to get walking routes. > > > > DRIVING ROUTES WORK: > > gdir.loadFromWaypoints([start, stop],{getSteps:true, travelmode: > > G_TRAVEL_MODE_DRIVING}); > > > > WALKING ROUTES DOESN'T: > > gdir.loadFromWaypoints([start, stop],{getSteps:true, travelmode: > > G_TRAVEL_MODE_WALKING}); > > > > It returns "error code 500, routes or adresses can't be treated". > > > > Does someone have the answer? > > I guess you're not providing a div for the route steps' description. > Walking routes require this; for driving directions it's optional. > > If that's not the reason, you will need to provide a link to your > page. > > Andrew > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
