mapbox / MapboxStatic.swift

Static map snapshots with overlays in Swift or Objective-C on iOS, macOS, tvOS, and watchOS
https://www.mapbox.com/api-documentation/?language=Swift#static
Other
189 stars 31 forks source link

URL-escape polyline-encoded overlay #26

Closed 1ec5 closed 8 years ago

1ec5 commented 8 years ago

Fixed an issue in which polyline-encoded strings containing ? would truncate the URL path, putting the rest of the path into the query string, causing the image request to fail due to a “missing access token”. Example:

https://api.mapbox.com/v4/justin.tm2-basemap/path-1+555555-1.0+555555-0.0(_atqG~bsgV?~reK)/-122.0,45.0,6/320x480@2x.png?access_token=…

This change applies a stricter allowed character set to path components.

/cc @tmcw