On Jan 6, 6:04 am, Saboor Awan <sab...@folio3.com> wrote:
> Hi,
> I am using google direction api in WP7 app, it returns a json format with
> steps to move from start to destination.
>
> My API Call
https://maps.googleapis.com/maps/api/directions/json?origin=24.874742...
>
> maps.google.com result :  my api call for location<

This is not the result of a call to the google maps direction web
service, it is a link to google maps:
http://maps.google.com/maps%3Fsaddr%3D24.874742,67.039934%26daddr%3D24.884685,67.056921%26hl%3Den%26ll%3D24.881337,67.048659%26spn%3D0.01314,0.022724%26sll%3D24.874842,67.040132%26sspn%3D0.01314,0.022724%26geocode%3DFfaOewEdvvL-Aw%253BFc21ewEdGTX_Aw%26vpsrc%3D0%26mra%3Dls%26t%3Dm%26z%3D16

If I look in the JSON result returned I see:

"polyline" : {
                        "points" : "aqyvCq{dxKuBPsBP"
                     },

That is an encoded polyline.
Decoder here:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/decode.html

Decoding it results in a set of lat/long coordinates:
24.875850000000003, 67.04073000000001
24.876440000000002, 67.04064000000001
24.87702, 67.04055000000001

  Larry

>
> my app parse the json, pick the step's start_location and end_location and
> plot a straight line on the map
>
> but google draws a line on the road from 4th step to 5th step.(check
> maps.google.com link)
> how do i know plot a line on the road, as you can check there is no points
> given for that.
>
> a think the *polyline* contain encrypted points for that, but i am not
> confirmed.....

-- 
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 google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to