Releases: mapbox/mapbox-maps-ios
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(...) -> Cancelable
andmapView.mapboxMap.onEvery(...) -> Cancelable
. (#339)StyleURI
,PreferredFPS
, andAnimationOwner
are now structs. (#285)- The
layout
andpaint
substructs for each layer are now merged into the root layer struct. (#362) GestureOptions
are owned byGestureManager
directly. (#343)LocationOptions
are owned byLocationManager
directly. (#344)MapCameraOptions
are owned bymapView.camera
directly. (#345)RenderOptions
are owned byBaseMapView
directly. (#350)AnnotationOptions
are owned byAnnotationManager
directly. (#351)MapView
has been coalesced intoBaseMapView
and the resulting object is calledMapView
. (#353)Style.uri
is now an optional property. (#347)Style
is no longer a dependency onLocationSupportableMapView
. (#352)Style
now has a more flat structure.Layout
andPaint
structs are now obsolete andLayer
properties are at the root layer. (#362)- Changed
LayerPosition
to an enum. (#221) - Removed
style
from MapView; updated tests and examples to usemapboxMap.style
. (#361) - The
visibleFeatures
APIs have been renamed toqueryRenderedFeatures
. (#361) LoggingConfiguration
is no longer public. (#361)- The following Swift wrappers have been added for existing types; these primarily change callbacks from using an internal
MBXExpected
type to using Swift'sResult
type. (#361)CacheManager
HttpResponse
OfflineSwitch
(which replaces NetworkConnectivity)OfflineRegionManager
(though this API is deprecated)
- Adds
loadStyleURI
andloadStyleJSON
toMapboxMap
. (#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._isVisible
andOrnamentOptions.attributionButton._isVisible
have been replaced withOrnamentOptions.logo.visibility
andOrnamentOptions.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 fromBaseMapView
toMapboxMap
(#286)- The API has also been aligned with Android by:
- Removing default values for parameters
- Making
bearing
andpitch
parameters optional - Adding the
camera(for:camera:rect:)
variant
- The API has also been aligned with Android by:
OrnamentOptions
should now be accessed viaMapView.ornaments.options
.MapConfig.ornaments
has been removed. Updates can be applied directly toOrnamentsManager.options
. Previously the map's ornament options were updated onMapConfig.ornaments
withMapView.update
. (#310)OrnamentOptions
now uses structs to manage options for individual ornaments. For example,OrnamentOptions.scaleBarPosition
is nowOrnamentOptions.scaleBar.position
. (#318)- The
LogoView
class is now private. (#310) Style
has been significantly refactored, for example:- Synchronous APIs returning
Result
types now throw. - A number of APIs previously accessed via
__map
are now available via theStyle
object. - APIs with a
get
prefix have been renamed; for examplegetLayer<T>(with:type:)
tolayer<T>(withId:type:) throws
andgetSource<T>(id:type:)
tosource<T>(withId:type:) throws
- Synchronous APIs returning
Features ✨ and improvements 🏁
OrnamentsManager
is now a public class and can be accessed via theMapView
'sornaments
property.CompassDirectionFormatter
is now public. It provides a string representation of aCLLocationDirection
and supports the same languages as in pre-v10 versions of the Maps SDK. (#300)-OrnamentOptions
should now be accessed viaMapView.ornaments.options
. Updates can be applied directly to theoptions
property. Previously the map's ornament options were updated viaMapConfig.ornaments
. (#310)- The
LogoView
class 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
CameraTransition
struct has been introduced to allow better control on the "from" and "to" values of a camera animation (#282)- A mutable version of the
CameraTransition
struct is passed into every animation block.
- A mutable version of the
- Animations can only be constructor injected into
CameraAnimator
as 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)
. MapOptions
has been renamedMapConfig
. A newMapOptions
has been introduced; its properties are required to initialize the underlying map object.- A
MapInitOptions
configuration struct has been introduced. It currently wraps bothResourceOptions
andMapOptions
and is used when initializing aMapView
. baseURL
andaccessToken
can no longer be set from a nib or storyboard. Instead a newMapInitOptionsProvider
protocol and anIBOutlet
onMapView
has been introduced to allow a customerMapInitOptions
to be provided to theMapView
. This provider is not used when initializing aMapView
programmatically.- The
Manager
suffix has been removed fromMapView.gesturesManager
,MapView.ornamentsManager
,MapView.cameraManager
,MapView.locationManager
, andMapView.annotationsManager
. BaseMapView.camera
has been renamed toBaseMapView.cameraOptions
.
- The initializer has changed to
-
Foundation
AccountManager
has been removed. A newCredentialsManager
replaces it. You can useCredentialsManager.default
to set a global access token.- MapboxCoreMaps protocol conformances have been encapsulated. (#265)
ObserverConcrete
has been removed.BaseMapView
no longer conforms toMapClient
orMBMMetalViewProvider
, and the methods they required are now internal.- The setter for
BaseMapView.__map
is now private Snapshotter
no longer conforms toObserver
, and the method it required is now internal.
- The
BaseMapView.__map
property has been moved toBaseMapView.mapboxMap.__map
. (#280) - A
CameraOptions
struct 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 theCameraOptions
concept. (#284)
-
Dependencies
- Updated dependencies to MapboxCoreMaps 10.0.0-beta.20 and MapboxCommon 11.0.1
- ResourceOptions now contains a
TileStore
instance. Tile store usage is enabled by default, the resource optiontileStoreEnabled
flag is introduced to disable it. TileStore
no longer returns cached responses for 401, 403 and unauthorized requests.- Fixed a bug where
TileStore
would not invoke completion closures (when client code did not keep a strong reference to the tile store instance).
Features ✨ and improvements 🏁
- Introduced the
OfflineManager
API that manages style packs and produces tileset descriptors for use with the tile store. TheOfflineManager
andTileStore
APIs are used in conjunction to download offline regions and associated "style packs". These new APIs replace the deprecatedOfflineRegionManager
. Please see the newOfflineManager
guide 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 ⚠️
-
AnnotationManager
no longer conforms toObserver
and no longer has apeer
. (#246) -
AnnotationSupportableMap
is now internal. (#246) -
MapView
- Initializer has been changed to
public init(frame: CGRect, resourceOptions: ResourceOptions, glyphsRasterizationOptions: GlyphsRasterizationOptions = GlyphsRasterizationOptions.default, styleURI: StyleURI? = .streets)
. StyleURL
has been renamed toStyleURI
OrnamentSupportableMapView
is not internal.
- Initializer has been changed to
-
Ornaments
LayoutPosition
has been deprecated in favor ofOrnamentPosition
.LayoutVisibility
has been depracted in favor ofOrnamentVisibility
.showsLogoView
has been renamed to_showsLogoView
.showsCompass
andshowsScale
have been deprecated. Visibility properties can be used to set how the Compass and Scale Bar should be shown.
-
Foundation
cancelTransitions
has 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
,fractionComplete
is now of typeDouble
anddelayFactor
now returns aDouble
. MapboxLogoView
has been renamed toLogoView
.MapboxLogoSize
has been renamed toLogoSize
.
-
Style
- Initializer is now marked as internal.
styleUri
property has been renamed touri
.- The
url
property fromStyleURL
has been removed.
-
Expressions
init(from: jsonObject)
andpublic func jsonObject()
have been removed.Element.op
has been renamed toElement.operator
.Argument.array
has been renamed toArgument.numberArray
.ValidExpressionArgument
has 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.moveCamera
method has been removed. (#217) UIView.animate
is 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) CameraAnimator
objects are managed by developers and should be stored by
developers to prevent the animations from falling out of scope.LocationOptions.showUserLocation
has been removed. Use
LocationOptions.puckType
instead, setting it tonil
if you do not want to
show the user location.LocationManager.showUserLocation
has also been
removed. (#203)- Make model layer internal and refactor for increased public API clarity
(#194, #198)ModelLayer
andModelSource
are now internalshouldTrackLocation
flag has been removed fromLocationConsumer
because
it was never usedPuckType.puck2D
's associated value is now non-optional. It still has a
default value corresponding to the previous behaviorLocationPuckManager
is now internal- Renaming:
LocationPuck
is nowPuckType
LocationOptions.locationPuck
is nowLocationOptions.puckType
LocationIndicatorLayerViewModel
is nowPuck2DConfiguration
PuckModelLayerViewModel
is 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.makeCameraAnimator
methods. (#217) - Gesture-driven camera changes have been updated to use camera animators. (#217)
- The
AnimatorOwner
enum has been added to track owners for individual
animators. (#217) CameraManager.fly(to:)
is now built on camera animators.zoom
,pitch
,
bearing
, andcenterCoordinate
keyframes 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:
mapResumedRendering
mapPausedRendering
mapLoadingStarted
renderMapStarted
renderMapFinished
cameraWillChange
cameraIsChanging
- Events that have been renamed:
EventType.Map.mapLoaded
->EventType.Map.loaded
MapEvents.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>
Mapbox Maps: v10.0.0-beta.13.1
Dependency requirements:
- Compatible version of MapboxCoreMaps: v10.0.0-beta.14.2
- Compatible version of MapboxCommon: v10.0.0-beta.9.2
- Compatible version of Xcode: 12.2
- Compatible version of MacOS: 10.15.7 Catalina
Changes
10.0.0-beta.13.1 - February 17. 2021
Breaking changes ⚠️
- Update Mapbox Common for iOS to v10.0.0-beta.9.2 and MapboxCoreMaps to v10.0.0-beta.14.2. (#115)
Bug fixes 🐞
- Fix issue where color components were in incorrect range (#112)
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/v10.0.0-beta.13.1/mapbox-maps-ios.zip?access_token=<access-token>