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

Read API base URL from Info.plist #79

Open 1ec5 opened 6 years ago

1ec5 commented 6 years ago

If no host is passed into Snapshot(options:accessToken:host:), the fallback hostname should be either api.mapbox.com or api.mapbox.cn depending on the value of MGLMapboxAPIBaseURL in Info.plist:

https://github.com/mapbox/MapboxStatic.swift/blob/32a32ef03b0094e98dcd07ad673125db4e0eb62c/MapboxStatic/Snapshot.swift#L114

This would be consistent with how we read the access token out of Info.plist:

https://github.com/mapbox/MapboxStatic.swift/blob/32a32ef03b0094e98dcd07ad673125db4e0eb62c/MapboxStatic/Snapshot.swift#L14-L15

/ref mapbox/MapboxGeocoder.swift#107 /cc @m-stephen