Yes but the probles is when gdir loads, loads two routes, and i want
only one.
I want only one (or another way to do it) beacause when the div in
wich you see the steps, i only want to see the instructions to go A-B
and pass for C, and not A-B and B-C
I think this is beacause when i load Gdir from more waypoints, it
calculate one route per pair of waypoints.

You can see that i want in the home page of google, when you choose 2
points (A,B), and later you drag a point(C) you want the route pass,
it recalculate the new Gdirection, and u only see the steps from A to
B, u dont see nothing about C.

I dont know if u understand me, sorry for my english, and Thanks, i
paste some code if it help u:

map = new GMap2(document.getElementById("divMap"));
gdir = new GDirections(map, document.getElementById("directions"));

function caminoEscogido(){
        arrastrandoMarca=false;
        var point = myNode.getPoint();

        puntosDeRuta[0] = gdir.getRoute(0).getStep(0).getLatLng();
        puntosDeRuta[1] = point;
        puntosDeRuta[2] = gdir.getRoute(0).getEndLatLng();


        recalcularRuta();
        }

function recalcularRuta(){
        gdir.clear();
        gdir.loadFromWaypoints(puntosDeRuta, {getPolyline:true});
}
--~--~---------~--~----~------------~-------~--~----~
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