Hello,
I am trying to save the DirectionsResult object that has been
dragged. I want to be able to reload it another time and allow the
route to be edited further.
I can save all of the points in the via_waypoint[] array. This allows
be to redraw the route as a polyline but it is no longer draggable.
The documentation says that the DirectionsResult is returned in JSON
format. So I've tried to convert the DirectionsResult to a JSON
string, save and reload that string as a JSON object and pass it to
the DirectionsRenderer. But it doesn't display and no errors are
thrown.
Below is a sample of what I was trying to do.
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
var str = JSON.stringify(response))
var obj= JSON.parse(str)
directionsDisplay.setDirections(obj);
}
I am presuming that this is possible as Google MyMaps provides this
functionality.
Any help would be gratefully appreciated.
Thanks
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.