Find direction points using Google Maps API 3 [Resolved]

Posted by Allemahesh under ASP.NET on 7/11/2013 | Points: 10 | Views : 2378 | Status : [Member] [MVP] | Replies : 1
I am using Google Map API3. I am drawing a route in Google Maps. I have passed the start point, way points and end points. My route is drawing correctly. Now How to find the direction points in this map?




Responses

Posted by: Jitendrasoft09 on: 7/12/2013 [Member] [MVP] Starter | Points: 50

Up
0
Down

Resolved
Hi,
Please look into below code for showing direction point in google api 3
function setroute(os)

{
    var wp = [];
    for(var i=0;i<os.waypoints.length;i++)
        wp[i] = {'location': new google.maps.LatLng(os.waypoints[i][0], os.waypoints[i][1]),'stopover':false }
         
    ser.route({'origin':new google.maps.LatLng(os.start.lat,os.start.lng),
    'destination':new google.maps.LatLng(os.end.lat,os.end.lng),
    'waypoints': wp,
    'travelMode': google.maps.DirectionsTravelMode.DRIVING},function(res,sts) {
        if(sts=='OK')ren.setDirections(res);
    }) 
}


Refer below link for more information-
http://vikku.info/programming/google-maps-v3/draggable-directions/saving-draggable-directions-saving-waypoints-google-directions-google-maps-v3.htm

Hope you are clear..

Jitendra Kumar
If my post helps you, plz mark as an answer.

Allemahesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response