Mapbox welcomes participation and contributions from everyone.
- Make
PointAnnotation.Image
's fields public. (#753) - Set
MapboxMap
flags during gestures and animations. (#754) - Treat anchor as constant for
ease(to:)
animations. (#772) - Fix experimental snapshot API for iOS 15. (#760)
- Decelerate more quickly (or not at all) on pitched maps. (#773)
- Add
GestureOptions.pinchRotateEnabled
to configure whether the pinch gesture rotates the map. (#779) - Fixed a name collision between Swift symbols and
MapboxCoreMaps.Task
. (#769) - Fixed an issue that caused
queryFeatureExtension
to fail. (#769) - Updated
MapboxCoreMaps
to v10.1.0-beta andMapboxCommon
to 20.1.0-rc.1. (#769)
- Passing an unsupported locale into
Style.localizeLabels(into:forLayerIds:)
throws an error instead of crashing. (#752) - Fixed a bug affecting the persistence of user settings when upgrading to v10. (#758)
- Allow compass visibility to accurately reflect set value. (#757)
- Update MapboxMobileEvents to v1.0.6, fixing a null pointer crash. (#762)
- Removes default parameter values in the
addImage
function. (#695) public func layer<T: Layer>(withId id: String) throws -> T
has been updated topublic func layer<T>(withId id: String, type: T.Type) throws -> T where T: Layer
. (#694)public func updateLayer<T: Layer>(withId id: String, update: (inout T) throws -> Void) throws
has been updated topublic func updateLayer<T>(withId id: String, type: T.Type, update: (inout T) throws -> Void) throws where T: Layer
. (#694)public func source<T: Source>(withId id: String) throws -> T
has been updated topublic func source<T>(withId id: String, type: T.Type) throws -> T where T: Source
. (#694)@_spi(Experimental) public func layer(withId id: String, type: Layer.Type) throws -> Layer
is no longer experimental and has been updated topublic func layer(withId id: String) throws -> Layer
. (#694)@_spi(Experimental) public func source(withId id: String, type: Source.Type) throws -> Source
is no longer experimental and has been updated topublic func source(withId id: String) throws -> Source
. (#694)GestureManagerDelegate.gestureBegan(for:)
has been renamed toGestureManagerDelegate.gestureManager(_:didBegin:)
. (#697)- Added the public delegate methods
GestureManagerDelegate.gestureManager(_:didEnd:willAnimate:)
andGestureManagerDelegate.gestureManager(_:didEndAnimatingFor:)
. (#697) - Converts
PointAnnotation.Image
from anenum
to astruct
. (#707) - Removes
PointAnnotation.Image.default
. (#707) - Replaces
PointAnnotation.Image.custom
withPointAnnotation.Image.init(image:name:)
. (#707) - The
tapGestureRecognizer
var on each*AnnotationManager
has been removed in favor of a unified tap gesture recognizer available atGestureManager.singleTapGestureRecognizer
(#709). public func layerProperty(for layerId: String, property: String) -> Any
has been renamed topublic func layerPropertyValue(for layerId: String, property: String) -> Any
to avoid ambiguity. (#708)MapboxCommon.Geometry
extension methods are now marked as internal. (#683)TileRegionLoadOptions
init now takes aGeometry
instead of aMapboxCommon.Geometry
. (#711)CameraAnimationsManager.options
has been removed. UseMapboxMap.cameraBounds
andMapboxMap.setCameraBounds(with:)
instead. (#712)MapboxMap.setCameraBounds(for:)
has been renamed to.setCameraBounds(with:)
(#712)- Renames
Style.updateGeoJSONSource<T: GeoJSONObject>(withId:geoJSON:)
toStyle.updateGeoJSONSource(withId:geoJSON:)
. Instead of passing in the expected GeoJSON object type, you perform pattern matching on the return value usingcase let
. (#715) - Setting
data
property on a GeoJSON source viaStyle.setSourceProperty(for:property:value:)
orStyle.updateGeoJSONSource(withId:geoJSON:)
is now asynchronous and never returns an error. Errors will be reported asynchronously via aMapEvents.EventKind.mapLoadingError
event instead. (#732) - Core and Common APIs that accept user-defined implementations of protocols now hold strong references to the provided objects. Please audit your usage of the following protocols and make any required changes to avoid memory leaks:
CustomLayerHost
,ElevationData
,MapClient
,MBMMetalViewProvider
,Observer
,OfflineRegionObserver
,HttpServiceInterceptorInterface
,HttpServiceInterface
,LogWriterBackend
,OfflineSwitchObserver
,ReachabilityInterface
,TileStoreObserver
. (#732) - Extends
OfflineRegionGeometryDefinition.geometry
to useGeometry
rather thanMapboxCommon.Geometry
. It also adds a convenience initializer that takes aGeometry
. (#706) - Annotation managers are now kept alive by the
AnnotationOrchestrator
(MapView.annotations
) until they are explicitly destroyed by callingmapView.annotations.removeAnnotationManager(withId:)
or are implicitly destroyed by creating a second annotation manager with the same ID. (#725) - The
AnnotationManager
protocol now conforms toAnyObject
. (#725) PreferredFPS
has been removed.MapView.preferredFramesPerSecond
now of typeInt
, rather thanPreferredFPS
. (#735)QueriedFeature.feature
is no longer optional. (#737)TypeConversionError
has a new caseunsuccessfulConversion
. (#737)
TileRegionLoadOptions
exposes its geometry as aGeometry
. (#711)- Adds
FeatureExtensionValue.init(value: Any?, features: [Feature]?)
that works with Turf. (#717) - Adds
FeatureExtensionValue.features: [Feature]?
that works with Turf. (#717) - APIs that accept Turf
Feature
now allowFeature.identifier
and.properties
to benil
. (#717) - APIs that accept Turf
Feature
now ignoreFeature.properties
instead of crashing if it cannot be converted to[String: NSObject]
. (#717) - Any touch event in the map now immediately disables camera animation. Temporarily disable user interaction on the
MapView
to disable this behavior as needed. (#712) BasicCameraAnimator
no longer updates the camera a final time after being stopped or canceled prior to running to completion. (#712)BasicCameraAnimator.isReversed
is now settable. (#712)- The double tap, quick zoom, and double touch gestures now use the gesture's location in the view to anchor camera changes. Previously, they used the camera's center coordinate. (#722)
MapboxCommon.HTTPServiceFactory.reset()
has been added to release the HTTP service implementation. (#732)AnnotationOrchestrator.annotationManagersById
has been added. This dictionary contains all annotation managers that have not been removed. (#725)- Adds the
ExpressionArgument.geoJSONObject(_:)
case, which allows you to include aTurf.GeoJSONObject
instance in an expression with theExpression.Operator.distance
orExpression.Operator.within
operator. (#730) - Adds
MapView.preferredFrameRateRange
for devices using iOS 15.0 and up. (#735) - Adds
TileStore.subscribe(_:)
which can be used to observe aTileStore
's activity. The API design deviates from Android's add/remove observer API so that the developer-providedTileStoreObserver
can be wrapped into aMapboxCommon_Private.TileStoreObserver
without needing to use global state or something like Objective-C associated objects to look up which wrapper goes with with developer-provided observer when calling__removeObserver
. (#737) - Adds
TileStoreObserver
protocol. (#737)
- Fix rendering artifacts for a model layer when
model-opacity
property is used. (#732) - Improve rendering performance by avoiding unnecessary re-layout for cached tiles. (#732)
- Fix telemetry opt-out through attribution dialog. (#743)
- Updates MapboxCoreMaps to v10.0.0, MapboxCommon to v20.0.0. (#732)
- Updates Turf to v2.x. (#741)
- Updates MapboxMobileEvents to v1.0.5. (#724)
BasicCameraAnimator
now keeps animators alive without the user storing the animator. (#646)- Experimental style APIs are now marked with
@_spi(Experimental)
and the previously used underscore prefixes have been removed. In order to access these methods, use@_spi(Experimental)
to annotate the import statement for MapboxMaps. (#680) RenderedQueryOptions.filter
is now of typeExpression
instead ofAny
(#689)OfflineRegionGeometryDefinition.geometry
is now of typeTurf.Geometry
instead ofMapboxCommon.Geometry
(#689)- The
HTTPResponse
init methods that takeMapboxCommon.Expected
instead ofResult
are now correctly marked as refined for Swift. (#689) - The
DownloadStatus
init methods that takeMapboxCommon.Expected
instead ofResult
andNSNumber?
instead ofUInt64?
are not correctly marked as refined for Swift. (#689) GestureOptions.hapticFeedbackEnabled
has been removed. (#663)GestureManager.decelarationRate
has been removed andGestureOptions.decelerationRate
is the single source of truth. (#662)GestureManager
no longer conforms toNSObject
and is not aUIGestureRecognizerDelegate
. (#669)TapGestureHandler.init
was previously public by mistake and is now internal. (#677)- The behavior of
GestureManager.options
has been updated to better reflect theisEnabled
state of the associated gesture recognizers. (#677) - The gesture recognizer properties of
GestureManager
are no longerOptional
. (#677) GestureType
has been redesigned so that its cases have a 1-1 relationship with the built-in gestures. (#677)GestureManager.rotationGestureRecognizer
has been removed. Rotation is now handled by.pinchGestureRecognizer
in addition to its preexisting handling of panning and zooming. (#696)GestureManager.doubleTapToZoomOutGestureRecognizer
has been replaced with.doubleTouchToZoomOutGestureRecognizer
. (#696)PanScrollingMode
has been renamed toPanMode
. (#696)GestureOptions.zoomEnabled
has been replaced by.doubleTapToZoomInEnabled
,.doubleTouchToZoomOutEnabled
, and.quickZoomEnabled
. (#696)GestureOptions.rotateEnabled
has been removed. (#696)GestureOptions.scrollEnabled
has been renamed to.panEnabled
. (#696)GestureOptions.scrollingMode
has been renamed to.panMode
. (#696)GestureOptions.decelerationRate
has been renamed to.panDecelerationFactor
. (#696)GestureType.doubleTapToZoomOut
has been replaced with.doubleTouchToZoomOut
. (#696)GestureType.rotate
has been removed. (#696)GestureType
cases have been reordered for consistency withGestureOptions
andGestureManager
. (#696)
- Allow users to set the map's
MapDebugOptions
. (#648) - Implement 'promoteId' feature for geojson and vector sources. The feature allows to promote feature's property to a feature id, so that promoted id can be used with FeatureState API. (#660)
- Tiled 3D model layer and source (#689)
- Enable instant transitions for data driven symbol layer properties (#689)
- Implement face culling for Metal (#689)
HTTPServiceInterface.getInstance()
is now publicly available. (#689)CameraState
's fields are nowvar
s instead oflet
s for testing purposes, and a public, memberwise initializer has been added. (#677)PanScrollingMode
now conforms toCaseIterable
. (#677)GestureType
now conforms toCaseIterable
. (#677)- Pan deceleration has been reimplemented to produce a more natural deceleration effect. (#692)
- Expose new API to allow users to create a
UIImage
out of the last rendered MapView state. (#693)
- Fixes animations that are started within an UIKit animation context. (#684)
- Fix transition between layers with all-constant properties (#689)
- Fix rendering artifact for a line layer, when its line-gradient property is set at runtime. (#689)
- Don't draw SDF images in text-field and issue warning for it (#689)
- Fix incorrect return from
StyleManager#getStyleLayerPropertyDefaultValue
for 'text-field'. Now the default value is set to["format", "" , {}]
(#689) - GestureManager no longer sets itself as the delegate of all gestures in MapView when its options change. (#677)
- Fixes an issue where tapping the compass could fail to set the bearing to 0 if there was already an animation running. Tapping the compass now cancels any existing animations. (#696)
- Fixes issues with the pinch gesture when removing and re-adding one of the two required touches. (#696)
- Fixes an issue where a pan gesture would fail if it interrupted the deceleration from a previous pan gesture. (#696)
QueriedFeature.feature
is now of typeTurf.Feature?
instead ofMapboxCommon.Feature
. (#628)- Enables error notification in offline mode if the required resource is missing in cache (before map did not emit any notification in this case) (#628)
- Suppresses error notifications on missing volatile tiles in offline mode (#628)
- Adapt setBounds to gl-js behavior: constraining of coordinates and zoom level is now stricter to prevent out of bounds map area to be visible in the viewport (#628)
- Add HTTP interceptor API - HttpServiceInterface has a new method
setInterceptor
that must be implemented (#628) Geometry
now refers toTurf.Geometry
instead ofMapboxCommon.Geometry
. (#622)Feature
now refers toTurf.Feature
instead ofMapboxCommon.Feature
. (#642)- Renamed
ColorRepresentable
toStyleColor
(#650) - Removed the argument label from
StyleColor
'sUIColor
initializer (#650) - Renamed
ColorRepresentable.rgbaDescription
toStyleColor.rgbaString
. (#650) - Changed
StyleColor
'sEncodable
implementation to always encode an rgba color string instead of encoding an rgba expression (#650) - Updated the extension on
UIColor
that addsExpressionArgumentConvertible
to return an rgba color string instead of an rgba expression. (#650) - Annotation managers now sync with their backing source and layer only once per display link. Use
syncSourceAndLayerIfNeeded()
to force the sync to happen earlier. (#650, #621) - The
layerType
argument toStyle._layerPropertyDefaultValue(for:property:)
is now of typeLayerType
instead ofString
(#650) Expression
decoding will now fail if the operator is missing (#650)PointAnnotationManager.textVariableAnchor
is now of type[TextAnchor]?
instead of[String]?
(#650)PointAnnotationManager.textWritingMode
is now of type[TextWritingMode]?
instead of[String]?
(#650)
- It is no longer necessary to
import Turf
. (#622) - Enable instant transitions for data driven paint layer properties (#628)
- Offload networking tasks at the init phase (#631)
- 3D pucks will now be rendered over other 3D content and occluded by terrain (#641)
- Added a public, failable, component-wise initializer to
StyleColor
(#650) - Updated
StyleColor
'sDecodable
support to be able to handle rgba color strings as well as rgba expressions (#650) - Made generated enums conform to
CaseIterable
(#650) - Location puck can now hide the accuracy ring. The default value is to hide the accuracy ring. In order to enable the ring, set the
showAccuracyRing
property inPuck2DConfiguration
totrue
. #629 - Annotation interaction delegates are only called when at least one annotation is detected to have been tapped (638)
- Fix volatile tiles disappearing on "not modified" response (#628)
- Fix crash in MapboxMap.clearData() (#628)
- Trigger map redraw when feature state changes (#628)
- Do not start background task if telemetry collection is disabled (#631)
- Fix KVC decoding for iOS 15 (#631)
- The GeoJSON source backing an
AnnotationMnager
is now removed correctly when anAnnotationManager
is deallocated (#633) - Updated annotations to use
rgbaString
andinit(rgbaString:)
when serializing and deserializingStyleColor
s (#650) - Annotation managers now properly restore the default values of any annotation or common style properties that are reset to nil, with the exception of
text-field
andline-gradient
for which there are currently issues to resolve between mapbox-maps-ios and mapbox-core-maps-ios. (#650) - Fixed Expression decoding when second array element could be an operator (#650)
- Fixed an issue where layer persistence was not maintained after calling
Style._moveLayer
. (#643) - Fix issue where annotations were not being returned to annotation interaction delegates (638)
TileStore.tileRegionGeometry(forId: String, completion: @escaping (Result<MapboxCommon.Geometry, Error>) -> Void)
has been updated toTileStore.tileRegionGeometry(forId: String, completion: @escaping (Result<Geometry, Error>) -> Void)
. (#661)
- Add support for
FeatureState
in GeoJSON sources. (#611)setFeatureState(sourceId:sourceLayerId:featureId:state:)
is used to associate astateMap
for a particular featuregetFeatureState(sourceId:sourceLayerId:featureId:callback:)
is used to retrieve a previously storedstateMap
for a featureremoveFeatureState(sourceId:sourceLayerId:featureId:stateKey:)
is used to remove a previously storedstateMap
for a feature
- Added
GeoJSONSource.generateId
(#593) - Enable the combined usage of line-dasharray with line-gradient (#588)
- Fixed rendering issue for round line-join in line gradients (#594)
- Removed GeoJSONManager. Please use Turf directly instead to serialize and deserialize GeoJSON. (#603)
- Add specific geometry types to annotations. (#612)
- Replace syncAnnotations with property setter. (#614)
- Update all Annotation files to use
get/set
instead ofdidSet
. This fixes an issue where properties were not being set atinit
. (#590) GeoJSONSource.clusterProperties
is now correctly modeled per the style spec. (#597)- Fixes a crash caused by
MapboxMap.clearData()
. (#609) - Added missing attribution and links to info alert controller. (#591)
- Fixed issue that caused incorrect animation of negative padding values (#602)
- Added support for building with Xcode 13b3. (#564)
- Added attribution to snapshots generated by
Snapshotter
. (#567) - Added a convenience initializer for
DownloadStatus
(#454)
- Fixed an issue where panning was not enabled while zooming. (#474)
- Fixed an issue where
MapView
positioning wasn't correct when used in containers such as UIStackView. (#533)
- Added new options to
MapSnapshotOptions
showsLogo
is a flag that will decide whether the logo will be shown on a snapshotshowsAttribution
is a flag that will decide whether the attribution will be shown on a snapshot
- Support
text-writing-mode
property for line symbol-placement text labels. (#522) Note: This change will bring following changes for CJK text block:- For vertical CJK text, all the characters including Latin and Numbers will be vertically placed now. Previously, Latin and Numbers are horizontally placed.
- For horizontal CJK text, it may have a slight horizontal shift due to the anchor shift.
- Expanded
localizeLabels(into: Locale)
to accept a[String]
. This array will contain a list of layer ids that you will want to localize. (#512)
TileRegionError
has a new casetileCountExceeded(String)
. (#522)- FlyToCameraAnimator.state will now be
.inactive
after it completes or is stopped. This change makes its behavior consistent with the behavior ofBasicCameraAnimator
. (#519) - Completion blocks added to
BasicCameraAnimator
will no longer be invoked as a side-effect of deinitialization. (#519) - Removed the
SupportedLanguage
enum. You may now useLocale(identifier: String)
as intended. (#512) - Removed the
MapView.locale
property. Now, in order to localize values, you must callmapView.mapboxMap.style.localizeLabels(into: Locale)
. (#512)
- Clean up network listener after http file source gets out of scope. (#522)
- Fix
line-center
anchor calculation when the anchor is very near to the line geometry point. (#522) - Fix threading issues in HTTP file source. (#522)
- Fixed an issue that could cause flickering during ease to and basic animations (#519)
- Fixed an issue that could result in ease to and basic animations never reaching their final values (#519)
- Introduced static method
MapboxMap.clearData(for:completion:)
and instance methodsMapboxMap.clearData(completion:)
andSnapshotter.clearData(completion:)
. These new methods allow clearing temporary map data. (#496) MapLoadingError
events now include source and tile information where appropriate. These new fields allow developers to understand what source or tile has failed to load and the reason for the failure. (#496)
- Fixed a runtime crash that occurred only when the SDK was included as an XCFramework (direct download). (#497)
- Fixed an issue where animators created by fly to and ease to were not released until the next fly to or ease to began. (#505)
- Fixed an issue where a complete animator would trigger redrawing unnecessarily. (#505)
- Fix raster/v1 terrain tiles fetch failures caused by appending pixel ratio to the URLs when tile size is equal to 512 (#496)
- Improve persistent layer pinning by keeping information about initial LayerPosition (#496)
- Introduced experimental
Style._addPersistentLayer(with:layerPosition:)
,Style._isPersistentLayer(id:)
,Style._addPersistentCustomLayer(withId:layerHost:layerPosition:)
APIs, so that the tagged layer and its associated resources remain when a style is reloaded. This improves performance of annotations during a style change. Experimental APIs should be considered liable to change in any SEMVER version. (#471, #473)
- Annotations now will persist across style changes by default. (#475)
- Adds localization support for v10 Maps SDK. This can be used by setting the
mapView.locale
. Use theSupportedLanguages
enum, which lists currently supportedLocale
. (#480) - Fixed Tileset descriptor bug: Completion handler is called even if the
OfflineManager
instance goes out of scope. - Fixed text rendering when both 'text-rotate' and 'text-offset' are set.
The Mapbox Maps SDK for iOS has moved to release candidate status and is now ready for production use.
- Converted
MapSnapshotOptions
to a struct. (#430) - Removed
CacheManager
. In the following releases, an API to control temporary map data may be provided. (#440) - Changed
ResourceOptions.cachePathURL
todataPathURL
and removedcacheSize
. (#440) - Annotations don't have a
type
property since they can be directly compared to a type. (451) - Internalize extensions of Core and Common types. (#449)
- Allows a developer to choose whether the puck is oriented based on
heading
orcourse
via a newpuckBearingSource
option inmapView.location.options
. By default, the puck will be oriented usingheading
. (#428) - All stock gesture recognizers are now public on the
GestureManager
. (450) - The tap gesture recognizer controlled by any given annotation manager is now public. (451)
- Fixed a bug where animations were not always honored. (#443)
- Fixed an issue that vertical text was not positioned correctly if the
text-offset
property was used. (#440) - Emit
.mapLoadingError
when an empty token is provided for accessing Mapbox data sources. Before the fix, the application may crash if an empty token was provided and map tries to load data from Mapbox data source. (#440) - Do not emit
.mapLoadingError
when an empty URL is set to GeoJSON source. (#440)
- Updated MapboxCoreMaps, MapboxCommon and Turf dependencies. (#440)
- Updated MapboxCoreMaps and MapboxCommon dependencies. (#388)
- Removed the
MBX
prefix fromMBXGeometry
,MBXGeometryType
andMBXFeature
. 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.__map
is now private. (#374)- Added
CameraManagerProtocol.setCameraBounds
,MapboxMap.prefetchZoomDelta
,MapboxMap.options
,MapboxMap.reduceMemoryUse()
,MapboxMap.resourceOptions
andMapboxMap.elevation(at:)
. (#374) - Removed
OfflineError.invalidResult
andOfflineError.typeMismatch
. (#374) - Updated
Projection
APIs to be more Swift-like. (#390) - Added
ResourceOptionsManager
and removedCredentialsManager
which it replaces.ResourceOptions
is now a struct. (#396) - Updated the ambient cache path. (#396)
- Removed
CameraAnimationsManager.setCamera()
and renamedCameraManagerProtocol._setCamera
toCameraManagerProtocol.setCamera()
. UseMapView.mapboxMap.setCamera()
to set the camera. (#426) - Removed
MapCameraOptions
andRenderOptions
; this behavior has moved to bothMapboxMap
andMapView
. (#427) - The Annotations library has been rebuilt to expose many more customization options for each annotation. (#398)
- High level animations return
Cancelable
instead ofCameraAnimator
. (#400)
- Fixed a bug with
TileStore.tileRegionGeometry
returning 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.delegate
was inaccessible. (#401)
- Added
Snapshotter.coordinateBounds(for:)
andSnapshotter.camera(for:padding:bearing:pitch:)
. (#386)
- Dependency management for development of the SDK has moved to Swift Package Manager and the existing Cartfile has been removed.
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. (#) - 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)
- Fixed an issue where the map's scale bar and compass view could trigger
layoutSubviews()
for the map view. (#338)
OrnamentOptions.logo._isVisible
andOrnamentOptions.attributionButton._isVisible
have been replaced withOrnamentOptions.logo.visibility
andOrnamentOptions.attributionButton.visibility
. (#326)
- Fixed an issue where location pucks would not be rendered. (#331)
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
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)
-
- 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
- A new
-
- Gestures now directly call
__map.setCamera()
instead of using CoreAnimation
- Gestures now directly call
-
- 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
-
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)
-
- 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).
- 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.
- Fixed a crash in line layer rendering, where the uniform buffer size had an incorrect value.
-
AnnotationManager
no longer conforms toObserver
and no longer has apeer
(#246) -
AnnotationSupportableMap
is now internal (#246) -
- 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
-
LayoutPosition
has been deprecated in favor ofOrnamentPosition
.LayoutVisibility
has been deprecated 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.
-
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
.
-
- Initializer is now marked as internal.
styleUri
property has been renamed touri
.- The
url
property fromStyleURL
has been removed.
-
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
- 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)
- 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. UseLocationOptions.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.
- All layer paint/layout properties can be defined via expressions (#185)
- Added RawRepresentable conformance to StyleURL. Removed enum cases for older style versions. (#168)
- 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 usingCameraManager.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)
- Fixes an issue in which the puck was not reflecting updates to its configuration (#199)
- Updates MapboxCoreMaps to v10.0.0.beta.16 and MapboxCommon to v10.0.0-beta.12 (#152)
- 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
- Maps SDK now supports a static bundle via direct download (#149)
- Updates Turf to v2.0.0-alpha.3 (#133)
- 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)
- 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)
- Rely on consumer provided view models directly to customize location pucks (#86)
- Update Mapbox Common for iOS to v10.0.0-beta.9.1 and MapboxCoreMaps to v10.0.0-beta.14.1. (#89)
- Update to Turf 2.0.0-alpha.2 (#93)
- Expose
presentsWithTransaction
property to better synchronize UIKit elements with theMapView
. (#94) - Add MapEvents.styleFullyLoaded. (#90)
- Refactor Annotation "properties" (#70)
- Fix Inconsistent Camera Heading (#68)
- Fix issue where updates to ornament options were not honored (#84)
- Dictionaries passed to expressions are now sorted by default (#81)
- Fixed: Pan drift did not work correctly when bearing was non-zero. (#99)
- Fix issue where toggling LocationOptions.showsUserLocation resulted in options not being updated (#101)
- Pan drift for pitched maps will be disabled. A solution for smooth drifting is being worked on. (#100)
V10 is the latest version of the Mapbox Maps SDK for iOS. v10 brings substantial performance improvements, new features like 3D terrain and a more powerful camera, modern technical foundations, and a better developer experience.
To get started with v10, please refer to our migration guide.
Please visit our issues to see open bugs, enhancements, or features requests.