Hi!
I've been playing around with the Elevation API.  What I have is an
arbitrary path that I've drawn on my map.  (It could potentially be
really long... I haven't addressed the 512 point/request and 2500
point/day limits yet, those pose another challenge.)  Anyway, I have a
path with probably a lot of points on it and I can generate the
encoded polyline for that path.  I [believe I] properly URL Encode it
in Java and pass it along in an HTTP request to the Elevation API.  I
keep getting back 400 Bad Request pages with no real helpful
information about why my request was bad.  I tried a path with just a
couple of points and I've even double-checked my polyline using the
Interactive Polyline Encoding tool that Google provides here:
http://code.google.com/apis/maps/documentation/utilities/polylineutility.html

Here's an example:

The request with points:
http://maps.googleapis.com/maps/api/elevation/json?path=39.203130,-76.822200|39.203290,-76.822350&samples=2&sensor=false
(this works)

Now, turning those points into an encoded polyline gives me:
Polyline: qzgnfvi{...@\
Levels: PP
which the interactive utility can plot just fine.

Attempting to encode the polyline and put it in the elevation URL:
http://maps.googleapis.com/maps/api/elevation/json?path=qzgnFvi%7BsM_%40%5C%5C&samples=7&sensor=false
(notice I escaped the backslash at the end with a second backslash.
it doesn't seem to work whether i've done that or not)

The Elevation API documentation indicates that you can pass an encoded
polyline as part of the path argument in the URL but I'm having such a
hard time with this I'm thinking maybe you can't.  Any ideas?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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