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

Remove outdated assertions about server-enforced limits #114

Closed 1ec5 closed 2 years ago

1ec5 commented 2 years ago

We should remove assertions about server-enforced limits that are likely to change in the future and update any others that have changed.

The API now supports up to zoom level 22:

https://github.com/mapbox/MapboxStatic.swift/blob/886e17c242fe9f573ab6c27871a26c0795400017/Sources/MapboxStatic/SnapshotOptions.swift#L126

The API no longer documents a limit to the number of overlays:

https://github.com/mapbox/MapboxStatic.swift/blob/886e17c242fe9f573ab6c27871a26c0795400017/Sources/MapboxStatic/SnapshotOptions.swift#L310

The API still documents an image size limit, but we should probably remove this assertion in favor of a server-side error, in case the limit changes in the future:

https://github.com/mapbox/MapboxStatic.swift/blob/886e17c242fe9f573ab6c27871a26c0795400017/Sources/MapboxStatic/SnapshotOptions.swift#L307-L308

/cc @ZiZasaurus