Hi.
I faced a task I can't resolve.
I have a DirectionResult object on the client side (in my .js file) which I
need send to the server (to the Python function) and put it into the
database (MongoDB).
How can I do this?
Now I'm trying to put the object into JSON string
for ex:
theRoute = JSON.stringify(directionsDisplay.getDirections());
then I'm sending it to server using POST method
$.post("/ajax/saveRoutePyth/", { csrfmiddlewaretoken:
$('input[name=csrfmiddlewaretoken]').val(), parName:name, parDesc:desc,
parRoute:theRoute}, function(pois) { ....
But when I watch it on the server I can't see any functions which were
inside the object.
Then I put the object into DB
When I'm trying to send this object back to client and do
directionsDisplay.setDirections(object) this route doesn't appear on the
map.
I wonder if this happens because of any functions were lost.
Am I right and if so how can I send this object to the server not using
JSON?
Thanks a lot for your help
PS trying to solve it for 2 days....
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-maps-js-api-v3/-/sMuGDks6MicJ.
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.