Releases: mapbox/mapbox-maps-ios
Mapbox Maps: v10.0.0-beta.21
Dependency requirements:
- Compatible version of MapboxCoreMaps: v10.0.0-beta.23
- Compatible version of MapboxCommon: v13.0.0
- Compatible version of Xcode: 12.4
- Compatible version of MacOS: Big Sur
Changes
10.0.0-beta.21 - June 3, 2021
Breaking changes ⚠️
- Updated MapboxCoreMaps and MapboxCommon dependencies. (#388)
- Removed the
MBXprefix fromMBXGeometry,MBXGeometryTypeandMBXFeature. Existing uses of the similar Turf types need to be fully namespaced, i.e.Turf.Feature - Introduced separate minZoom/maxZoom fields into CustomGeometrySourceOptions API instead of the formerly used
zoomRange - Improved zooming performance.
- Fixed terrain transparency issue when a sky layer is not used.
- Removed the
MapboxMap.__mapis now private. (#374)- Added
CameraManagerProtocol.setCameraBounds,MapboxMap.prefetchZoomDelta,MapboxMap.options,MapboxMap.reduceMemoryUse(),MapboxMap.resourceOptionsandMapboxMap.elevation(at:). (#374) - Removed
OfflineError.invalidResultandOfflineError.typeMismatch. (#374) - Updated
ProjectionAPIs to be more Swift-like. (#390) - Added
ResourceOptionsManagerand removedCredentialsManagerwhich it replaces.ResourceOptionsis now a struct. (#396) - Updated the ambient cache path. (#396)
- Removed
CameraAnimationsManager.setCamera()and renamedCameraManagerProtocol._setCameratoCameraManagerProtocol.setCamera(). UseMapView.mapboxMap.setCamera()to set the camera. (#426) - Removed
MapCameraOptionsandRenderOptions; this behavior has moved to bothMapboxMapandMapView. (#427) - The Annotations library has been rebuilt to expose many more customization options for each annotation. (#398)
- High level animations return
Cancelableinstead ofCameraAnimator. (#400)
Bug fixes 🐞
- Fixed a bug with
TileStore.tileRegionGeometryreturning invalid value. (#390) - Fixed a bug where the underlying renderer was not being destroyed. (#395)
- Fixed a bug where the snapshotter completion handler was being called twice on cancellation.
(#382) - Fixed a bug where
GestureManager.delegatewas inaccessible. (#401)
Features ✨ and improvements 🏁
- Added
Snapshotter.coordinateBounds(for:)andSnapshotter.camera(for:padding:bearing:pitch:). (#386)
Development 🛠
- Dependency management for development of the SDK has moved to Swift Package Manager and the existing Cartfile has been removed.
Direct download
Link to download binaries (append your own Mapbox access token scoped with DOWNLOADS:READ):
https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/10.0.0-beta.21/MapboxMaps.zip?access_token=<access-token>
Mapbox Maps: v10.0.0-beta.20
Dependency requirements:
- Compatible version of MapboxCoreMaps: v10.0.0-beta.22
- Compatible version of MapboxCommon: v12.0.0
- Compatible version of Xcode: 12.4
- Compatible version of MacOS: Big Sur
Changes
10.0.0-beta.20 - May 20, 2021
Breaking changes ⚠️
BaseMapView.on()has now been replaced bymapView.mapboxMap.onNext(...) -> CancelableandmapView.mapboxMap.onEvery(...) -> Cancelable. (#339)StyleURI,PreferredFPS, andAnimationOwnerare now structs. (#285)- The
layoutandpaintsubstructs for each layer are now merged into the root layer struct. (#362) GestureOptionsare owned byGestureManagerdirectly. (#343)LocationOptionsare owned byLocationManagerdirectly. (#344)MapCameraOptionsare owned bymapView.cameradirectly. (#345)RenderOptionsare owned byBaseMapViewdirectly. (#350)AnnotationOptionsare owned byAnnotationManagerdirectly. (#351)MapViewhas been coalesced intoBaseMapViewand the resulting object is calledMapView. (#353)Style.uriis now an optional property. (#347)Styleis no longer a dependency onLocationSupportableMapView. (#352)Stylenow has a more flat structure.LayoutandPaintstructs are now obsolete andLayerproperties are at the root layer. (#362)- Changed
LayerPositionto an enum. (#221) - Removed
stylefrom MapView; updated tests and examples to usemapboxMap.style. (#361) - The
visibleFeaturesAPIs have been renamed toqueryRenderedFeatures. (#361) LoggingConfigurationis no longer public. (#361)- The following Swift wrappers have been added for existing types; these primarily change callbacks from using an internal
MBXExpectedtype to using Swift'sResulttype. (#361)CacheManagerHttpResponseOfflineSwitch(which replaces NetworkConnectivity)OfflineRegionManager(though this API is deprecated)
- Adds
loadStyleURIandloadStyleJSONtoMapboxMap. (#354)
Bug fixes 🐞
- Fixed an issue where the map's scale bar and compass view could trigger
layoutSubviews()for the map view. (#338)
Direct download
Link to download binaries (append your own Mapbox access token scoped with DOWNLOADS:READ):
https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/10.0.0-beta.20/MapboxMaps.zip?access_token=<access-token>
Mapbox Maps: v10.0.0-beta.19.1
Dependency requirements:
- Compatible version of MapboxCoreMaps: 10.0.0-beta.21
- Compatible version of MapboxCommon: 11.0.2
- Compatible version of Xcode: 12.4
- Compatible version of MacOS: Big Sur
Changes
Breaking changes ⚠️
OrnamentOptions.logo._isVisibleandOrnamentOptions.attributionButton._isVisiblehave been replaced withOrnamentOptions.logo.visibilityandOrnamentOptions.attributionButton.visibility. (#326)
Bug fixes 🐞
- Fixed an issue where location pucks would not be rendered. (#331)
Direct download
Link to download binaries (append your own Mapbox access token scoped with DOWNLOADS:READ):
https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/10.0.0-beta.19.1/MapboxMaps.zip?access_token=<access-token>
Mapbox Maps: v10.0.0-beta.19
Dependency requirements:
- Compatible version of MapboxCoreMaps: 10.0.0-beta.21
- Compatible version of MapboxCommon: 11.0.2
- Compatible version of Xcode: 12.4
- Compatible version of MacOS: Big Sur
Changes
Breaking changes ⚠️
camera(for:)methods have moved fromBaseMapViewtoMapboxMap(#286)- The API has also been aligned with Android by:
- Removing default values for parameters
- Making
bearingandpitchparameters optional - Adding the
camera(for:camera:rect:)variant
- The API has also been aligned with Android by:
OrnamentOptionsshould now be accessed viaMapView.ornaments.options.MapConfig.ornamentshas been removed. Updates can be applied directly toOrnamentsManager.options. Previously the map's ornament options were updated onMapConfig.ornamentswithMapView.update. (#310)OrnamentOptionsnow uses structs to manage options for individual ornaments. For example,OrnamentOptions.scaleBarPositionis nowOrnamentOptions.scaleBar.position. (#318)- The
LogoViewclass is now private. (#310) Stylehas been significantly refactored, for example:- Synchronous APIs returning
Resulttypes now throw. - A number of APIs previously accessed via
__mapare now available via theStyleobject. - APIs with a
getprefix have been renamed; for examplegetLayer<T>(with:type:)tolayer<T>(withId:type:) throwsandgetSource<T>(id:type:)tosource<T>(withId:type:) throws
- Synchronous APIs returning
Features ✨ and improvements 🏁
OrnamentsManageris now a public class and can be accessed via theMapView'sornamentsproperty.CompassDirectionFormatteris now public. It provides a string representation of aCLLocationDirectionand supports the same languages as in pre-v10 versions of the Maps SDK. (#300)-OrnamentOptionsshould now be accessed viaMapView.ornaments.options. Updates can be applied directly to theoptionsproperty. Previously the map's ornament options were updated viaMapConfig.ornaments. (#310)- The
LogoViewclass is now private. (#310)
Direct download
Link to download binaries (append your own Mapbox access token scoped with DOWNLOADS:READ):
https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/10.0.0-beta.19/MapboxMaps.zip?access_token=<access-token>
Mapbox Maps: v10.0.0-beta.18.1
Dependency requirements:
- Compatible version of MapboxCoreMaps: v10.0.0-beta.20
- Compatible version of MapboxCommon: v11.0.1
- Compatible version of Xcode: 12.4
- Compatible version of MacOS: Big Sur
Changes
Features ✨ and improvements 🏁
Camera Animations
- A new
CameraTransitionstruct has been introduced to allow better control on the "from" and "to" values of a camera animation (#282)- A mutable version of the
CameraTransitionstruct is passed into every animation block.
- A mutable version of the
- Animations can only be constructor injected into
CameraAnimatoras part of themakeAnimator*methods onmapView.camera. - The
makeCameraAnimator*methods have been renamed tomakeAnimator*methods
Gestures
- Gestures now directly call
mapboxMap.__map.setCamera()instead of using CoreAnimation
Direct download
Link to download binaries (append your own Mapbox access token scoped with DOWNLOADS:READ):
https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/10.0.0-beta.18.1/MapboxMaps.zip?access_token=<access-token>
Mapbox Maps: v10.0.0-beta.18
Dependency requirements:
- Compatible version of MapboxCoreMaps: v10.0.0-beta.20
- Compatible version of MapboxCommon: v11.0.1
- Compatible version of Xcode: 12.4
- Compatible version of MacOS: Big Sur
Changes
Breaking changes ⚠️
-
MapView- The initializer has changed to
public init(frame: CGRect, mapInitOptions: MapInitOptions = MapInitOptions(), styleURI: StyleURI? = .streets). MapOptionshas been renamedMapConfig. A newMapOptionshas been introduced; its properties are required to initialize the underlying map object.- A
MapInitOptionsconfiguration struct has been introduced. It currently wraps bothResourceOptionsandMapOptionsand is used when initializing aMapView. baseURLandaccessTokencan no longer be set from a nib or storyboard. Instead a newMapInitOptionsProviderprotocol and anIBOutletonMapViewhas been introduced to allow a customerMapInitOptionsto be provided to theMapView. This provider is not used when initializing aMapViewprogrammatically.- The
Managersuffix has been removed fromMapView.gesturesManager,MapView.ornamentsManager,MapView.cameraManager,MapView.locationManager, andMapView.annotationsManager. BaseMapView.camerahas been renamed toBaseMapView.cameraOptions.
- The initializer has changed to
-
Foundation
AccountManagerhas been removed. A newCredentialsManagerreplaces it. You can useCredentialsManager.defaultto set a global access token.- MapboxCoreMaps protocol conformances have been encapsulated. (#265)
ObserverConcretehas been removed.BaseMapViewno longer conforms toMapClientorMBMMetalViewProvider, and the methods they required are now internal.- The setter for
BaseMapView.__mapis now private Snapshotterno longer conforms toObserver, and the method it required is now internal.
- The
BaseMapView.__mapproperty has been moved toBaseMapView.mapboxMap.__map. (#280) - A
CameraOptionsstruct has been introduced. This shadows the class of the same name from MapboxCoreMaps and. This avoids unintended sharing and better reflects the intended value semantics of theCameraOptionsconcept. (#284)
-
Dependencies
- Updated dependencies to MapboxCoreMaps 10.0.0-beta.20 and MapboxCommon 11.0.1
- ResourceOptions now contains a
TileStoreinstance. Tile store usage is enabled by default, the resource optiontileStoreEnabledflag is introduced to disable it. TileStoreno longer returns cached responses for 401, 403 and unauthorized requests.- Fixed a bug where
TileStorewould not invoke completion closures (when client code did not keep a strong reference to the tile store instance).
Features ✨ and improvements 🏁
- Introduced the
OfflineManagerAPI that manages style packs and produces tileset descriptors for use with the tile store. TheOfflineManagerandTileStoreAPIs are used in conjunction to download offline regions and associated "style packs". These new APIs replace the deprecatedOfflineRegionManager. Please see the newOfflineManagerguide for more details.
Bug fixes 🐞
- Fixed a crash in line layer rendering, where the uniform buffer size had an incorrect value.
Direct download
Link to download binaries (append your own Mapbox access token scoped with DOWNLOADS:READ):
https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/10.0.0-beta.18/MapboxMaps.zip?access_token=<access-token>
Mapbox Maps: v10.0.0-beta.17
Dependency requirements:
- Compatible version of MapboxCoreMaps: v10.0.0-beta.19
- Compatible version of MapboxCommon: v11.0.0
- Compatible version of Xcode: 12.4
- Compatible version of MacOS: Big Sur
Changes
Breaking changes ⚠️
-
AnnotationManagerno longer conforms toObserverand no longer has apeer. (#246) -
AnnotationSupportableMapis now internal. (#246) -
MapView
- Initializer has been changed to
public init(frame: CGRect, resourceOptions: ResourceOptions, glyphsRasterizationOptions: GlyphsRasterizationOptions = GlyphsRasterizationOptions.default, styleURI: StyleURI? = .streets). StyleURLhas been renamed toStyleURIOrnamentSupportableMapViewis not internal.
- Initializer has been changed to
-
Ornaments
LayoutPositionhas been deprecated in favor ofOrnamentPosition.LayoutVisibilityhas been depracted in favor ofOrnamentVisibility.showsLogoViewhas been renamed to_showsLogoView.showsCompassandshowsScalehave been deprecated. Visibility properties can be used to set how the Compass and Scale Bar should be shown.
-
Foundation
cancelTransitionshas been renamed tocancelAnimations.setCamera()with individual parameters has been deprecated in favor ofsetCamera(to targetCamera: CameraOptions...)which requiresCameraOptions.- The following camera convenience functions have been removed:
public func transitionCoordinateBounds(newCoordinateBounds: CoordinateBounds, animated: Bool = false)public func transitionCoordinateBounds(to newCoordinateBounds: CoordinateBounds, edgePadding: UIEdgeInsets, animated: Bool = false, completion: ((UIViewAnimatingPosition) -> Void)? = nil)public func transitionVisibleCoordinates(newCoordinates: [CLLocationCoordinate2D], edgePadding: UIEdgeInsets, animated: Bool = false)public func transitionVisibleCoordinates(to newCoordinates: [CLLocationCoordinate2D], edgePadding: UIEdgeInsets, bearing: CLLocationDirection, duration: TimeInterval, animated: Bool = false, completion: ((UIViewAnimatingPosition) -> Void)? = nil)public func resetPosition()public func resetNorth(_ animated: Bool = false)
- In
CameraAnimator,fractionCompleteis now of typeDoubleanddelayFactornow returns aDouble. MapboxLogoViewhas been renamed toLogoView.MapboxLogoSizehas been renamed toLogoSize.
-
Style
- Initializer is now marked as internal.
styleUriproperty has been renamed touri.- The
urlproperty fromStyleURLhas been removed.
-
Expressions
init(from: jsonObject)andpublic func jsonObject()have been removed.Element.ophas been renamed toElement.operator.Argument.arrayhas been renamed toArgument.numberArray.ValidExpressionArgumenthas been renamed toExpressionArgumentConvertible.
Bug fixes 🐞
- Fixes an issue that could prevent annotations from being selectable. (#246)
- Fixes an issue where some JSON layers are not be decoded correctly. (#248)
- Fixes an issue where the location puck was not animating. (#256)
Direct download
Link to download binaries (append your own Mapbox access token scoped with DOWNLOADS:READ):
https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/10.0.0-beta.17/MapboxMaps.zip?access_token=<access-token>
Mapbox Maps: v10.0.0-beta.16
Dependency requirements:
- Compatible version of MapboxCoreMaps: 10.0.0-beta.17
- Compatible version of MapboxCommon: 10.0.2
- Compatible version of Xcode: 12.2+
- Compatible version of MacOS: Big Sur
Changes
Breaking changes ⚠️
- The
CameraManager.moveCameramethod has been removed. (#217) UIView.animateis no longer supported. Instead, useCameraAnimators. (#217)- Developers should make camera changes directly to
MapView's camera
properties. Previously, changes could be applied toMapView.cameraView. (#217) CameraAnimatorobjects are managed by developers and should be stored by
developers to prevent the animations from falling out of scope.LocationOptions.showUserLocationhas been removed. Use
LocationOptions.puckTypeinstead, setting it tonilif you do not want to
show the user location.LocationManager.showUserLocationhas also been
removed. (#203)- Make model layer internal and refactor for increased public API clarity
(#194, #198)ModelLayerandModelSourceare now internalshouldTrackLocationflag has been removed fromLocationConsumerbecause
it was never usedPuckType.puck2D's associated value is now non-optional. It still has a
default value corresponding to the previous behaviorLocationPuckManageris now internal- Renaming:
LocationPuckis nowPuckTypeLocationOptions.locationPuckis nowLocationOptions.puckTypeLocationIndicatorLayerViewModelis nowPuck2DConfigurationPuckModelLayerViewModelis nowPuck3DConfiguration
- Updates dependencies to MapboxCoreMaps 10.0.0-beta.17 and MapboxCommon 10.0.2.
(#193)- [rendering] Query rendered features now work for fill-extrusions when
terrain is enabled. - [rendering] Improved terrain rendering performance due to reduction of
loaded tiles.
- [rendering] Query rendered features now work for fill-extrusions when
- All layer paint/layout properties can be defined via expressions (#185)
- Added RawRepresentable conformance to StyleURL. Removed enum cases for older
style versions. (#168)
Features ✨ and improvements 🏁
- Introduced the platform-driven Drag API for shifting the map’s camera. (#217)
- Introduced
CameraAnimator, a UIViewPropertyAnimator-based class for
animating camera changes. These animators should be created using
CameraManager.makeCameraAnimatormethods. (#217) - Gesture-driven camera changes have been updated to use camera animators. (#217)
- The
AnimatorOwnerenum has been added to track owners for individual
animators. (#217) CameraManager.fly(to:)is now built on camera animators.zoom,pitch,
bearing, andcenterCoordinatekeyframes are supported. (#217)- The getter for LocationManager.locationOptions is now public. (#209)
- Added function to get layer identifier for an annotation type. (#189)
- Add PreferredFPS.custom() to add support for custom preferred frames per
second values. (#157)
Bug fixes 🐞
- Fixes an issue in which the puck was not reflecting updates to its
configuration (#199)
Direct download
Link to download binaries (append your own Mapbox access token scoped with DOWNLOADS:READ):
https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/10.0.0-beta.16/MapboxMaps.zip?access_token=<access-token>
Mapbox Maps: v10.0.0-beta.15
Dependency requirements:
- Compatible version of MapboxCoreMaps: v10.0.0-beta.16
- Compatible version of MapboxCommon: v10.0.0-beta.12
- Compatible version of Xcode: 12.2
- Compatible version of MacOS: Big Sur
Changes
Breaking changes ⚠️
- Updates MapboxCoreMaps to v10.0.0.beta.16 and MapboxCommon to v10.0.0-beta.12 (#152)
New Events API
- The above breaking change introduces the new Map Events API which will:
- Simplify the Map API and align it with other weakly typed interfaces (addStyleLayer, addStyleSource, etc.).
- Minimize the effort for addition of new events.
- Expose experimental events.
- Suppress events that a developer hasn't subscribed to.
- Automatically expose new events for Snapshotter (eliminating the need to modify MapObserver and MapSnapshotterObserver separately).
- Events that have been removed:
mapResumedRenderingmapPausedRenderingmapLoadingStartedrenderMapStartedrenderMapFinishedcameraWillChangecameraIsChanging
- Events that have been renamed:
EventType.Map.mapLoaded->EventType.Map.loadedMapEvents.EventKind.cameraDidChange->MapEvents.EventKind.cameraChanged
Direct download
Link to download binaries (append your own Mapbox access token scoped with DOWNLOADS:READ):
Dynamic Bundle
https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/10.0.0-beta.15/MapboxMaps-dynamic.zip?access_token=<access-token>
Static Bundle
https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/packages/10.0.0-beta.15/MapboxMaps-static.zip?access_token=<access-token>
Mapbox Maps: v10.0.0-beta.14
Dependency requirements:
- Compatible version of MapboxCoreMaps: 10.0.0-beta.15
- Compatible version of MapboxCommon: 10.0.0-beta.11
- Compatible version of Xcode: 12.2
- Compatible version of MacOS: Big Sur
Breaking changes ⚠️
- Updates Turf to v2.0.0-alpha.3 (#133)
Features ✨ and improvements 🏁
- MapboxMaps now supports Apple Silicon. M1 Macs can now be used as development machines. (#48)
- MapboxMaps is now built from source when consumed via Swift Package Manager or Cocoapods. (#125, #118)
- Added SwiftUI example. (#78)
- Allow a developer to synchronously update a layer with one API call -- no longer have to retrieve and re-add a layer. (#85)
- MapboxMaps can now be built and tested using Swift Package Manager (#125)
Bug fixes 🐞
- Prevent pitch and zoom from exceeding limits. Also updates default maximum pitch to 85 degrees. (#103)
- Fixed an issue where quick zoom did not work at higher zoom levels. Also made the duration argument of the setCamera methods non-optional with default of 0. (#109)
- GestureManager.delegate is now weak (#134)
- Using heuristic to provide pan drift when the map is pitched (#120)
Direct download
Link to download binaries (append your own Mapbox access token scoped with DOWNLOADS:READ):
Dynamic:
https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/10.0.0-beta.14/MapboxMaps-dynamic.zip?access_token=<access-token>
Static:
https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/packages/10.0.0-beta.14/MapboxMaps-static.zip?access_token=<access-token>