I'm trying to draw an encoded polyline via the Google Maps API (v3), and it seems to draw 'sort of' correctly (as in, roughly in the right area of the world ;) ) but otherwise is very, very wrong. (Pictures to follow)
Essentially, I'm using the Strava API (v3) to get road 'segments', which include encoded polylines (http://strava.github.io/api/#polylines). The short version is, I'm decoding these as per the Google documentation and then creating a new Polyline object with the new path and adding it to the map.
I've been very brief in summing up that part, simply because my method doesn't seem to be the issue here... If I take the encoded polyline string directly from the response of the API call and paste it into Google's Interactive Polyline Encoder Utility (https://developers.google.com/maps/documentation/utilities/polylineutility) I see the same 'wrong' path.
So, that leaves two possibilities... Either the Strava API is passing out incorrect data, or I'm not correctly understanding what I'm supposed to do with it.
I've attached the relevant images + polyline below. Am I doing something obviously wrong?
Example 'encoded' polyline:
Strava map (correct):
Decoded polyline (wrong):