Mapbox welcomes participation and contributions from everyone.
- Fix incorrect positioning of map ornaments when multiple ornaments are placed in the same corner.
- Expose
MapboxMap.onStyleAttributionsChanged, use this event to observe when attributions have been changed due to style change, source metadata change, or if sources were removed or added.
- Add animation to experimental
Markerwith two animation triggers:appearanddisappear. Each trigger acceptsMarkerAnimationEffectincludingwiggle(pendulum rotation),scale,fadeIn, andfadeOut. Effects can be customized with parameters (e.g.,scale(from: 0.5, to: 1.5),fade(from: 0.5, to: 1.0)) and combined for rich animations. SeeMarkersExamplefor usage.
- Fix map panning not working on ViewAnnotations
- Introduce new
LineLayer.lineElevationGroundScaleproperty to scale elevated lines with terrain exaggeration. - Promote elevated lines properties to stable:
LineLayer.lineZOffsetandLineLayer.lineElevationReference. - Introduce experimental
SymbolScaleBehaviorAPI to automatically scale map symbols (icons and text) based on system accessibility text size settings. SetMapboxMap.symbolScaleBehaviorproperty to configure:.system(automatic scaling),.system(mapping:)(custom mapping function), or.fixed(scaleFactor:)(fixed scale, default is 1.0). Valid scale factor range is [0.8, 2.0]. Automatic scaling is opt-in; symbols default to fixed 1.0x scale. - Add
ModelSourcesupport withModel,ModelMaterialOverride, andModelNodeOverrideto enable interactive 3D models. Material overrides allow customization of color, emissive strength, opacity, and color mix intensity. Node overrides enable control of model part transformations such as rotating doors, landing gear, or propellers. Models can be updated via source-driven approach (modifyingModelSource.modelsdirectly) or feature-state driven approach (using expressions with feature state for dynamic control). For implementation examples, seeInteractive3DModelFeatureStateExample(SwiftUI),Interactive3DModelSourceExample(UIKit), andAnimated3DModelSourceExample(SwiftUI).
- Introduce experimental
queryRenderedRasterValuesAPI for querying the rendered raster array value at a point on the map.
- Fix
FrameViewAnnotationsExampleannotations disappearing before shadow leaves the screen.
- Fixed crash in camera API methods when given invalid coordinates (NaN or infinity values). Methods now return empty
CameraOptionsinstead of crashing.
- Remove line-cutout-width and change line-cutout-opacity default to 1.0
- Add
ModelLayer.modelAllowDensityReductionproperty to disable density reduction in model layers.
- Add Standard Style color and 3D configuration options:
colorBuildings,colorCommercial,colorEducation,colorIndustrial,colorLand,colorMedical,show3dBuildings,show3dFacades,show3dLandmarks, andshow3dTrees. - Add experimental
shadowDrawBeforeLayerproperty to directional light to allow specifying the position in the layer stack for drawing shadows on the ground. - [tile_store] Add method to set tilestore path to be used by default.
- Faster polygon triangulation for complex polygons.
- General fixes and performance improvements.
- Fix
userDatapayload foronSourceDataLoadedevent during GeoJSON partial update.
- Promote Geofencing APIs to stable. Remove
@_spi(Experimental)from Geofencing APIs. - Fix an issue where the location indicator could show incorrect direction in landscape orientation.
- Update viewport state when map size is changed.
- Promote
ModelLayerto stable. - Add
SymbolLayer.occlusionOpacityMode,SymbolLayer.iconColorBrightnessMax,SymbolLayer.iconColorBrightnessMin,SymbolLayer.iconColorContrastproperties. - Add
FillExtrusionLayer.castShadowsproperty. - Add
GeoJSONSource.minZoomproperty. - Add
RasterArraySource.volatileexperimental property. - Make
line-emissive-strengthproperty data-driven. - Add experimental
MapboxMap.setFeatureStateExpression(),removeFeatureStateExpression(), andresetFeatureStateExpressions()APIs to efficiently update feature state for multiple features at once using expressions. - Add experimental async variants of
MapboxMap.setLayerProperty(),setLayerPropertiesandupdateLayer().
- Introduced
ScaleBarViewOptions.unitsproperty supporting metric, imperial, and nautical units, replacing the booleanuseMetricUnitsproperty. - Fix crash in
OrnamentsManagerwhen setting attribution color. - Added
fuelingStationModePointOfInterestLabelsconfiguration option to Mapbox Standard and Standard Satellite styles. Control the visibility of fuel station and electric charging station POI labels with options:default(shows both),fuel(fuel stations only),electric(charging stations only), ornone(hides both). - Introduce
MapInitOptions.mapStyleproperty. Use it to initialize map with a custom style.
// Before
let options = MapInitOptions(styleURI: .standardSatellite)
let mapView = MapView(frame: view.bounds, mapInitOptions: options)
mapView.mapboxMap.setStyleImportConfigProperties(for: "basemap", configs: ["lightPreset": "dusk"])
// After:
let options = MapInitOptions(mapStyle: .standardSatellite(lightPreset: .dusk))
let mapView = MapView(frame: view.bounds, mapInitOptions: options)- Add
StyleReloadPolicyto control style reload behavior. UsereloadPolicy: .alwaysparameter inloadStyle()methods orMapStyleinitializers to always reload the style even when the URI or JSON matches the currently loaded style. Defaults to.onlyIfChangedfor optimal performance.
- Introduce the
LocationManager.locationDataModeland make it possible to use location provider from MapboxCommon. Deprecate theLocationManager.override*methods. Now you can choose to use the location provider from MapboxCommon.
@_spi(Experimental) import MapboxMaps
// UIKit
let initOptions = MapInitOptions(
locationDataModel: .createCore()
)
let mapView = MapView(mapInitOptions: initOptions) // specify at init time (recommended)
mapView.mapboxMap.locationDataModel = .createCore() // or, override it at runtime
// SwiftUI
struct MyView: View {
@State var locationDataModel = LocationDataModel.createCore()
var body: some View {
Map(viewport: $viewport) {
Puck2D(bearing: .heading)
}
.locationDataModel(locationDataModel)
}
}- Added experimental
scaleFactorparam toMapOptions,MapSnapshotOptionsfor scaling icons and texts. - Added support for
LandmarkIconsfeatureset in Mapbox Standard Style. TheLandmarkIconsfeatureset allows querying and configuring landmark building icons that appear on the map. Access landmark properties including landmarkId, name, type, and localized names through theStandardLandmarkIconsFeatureclass. - Enhanced
MapStyle.standard()andMapStyle.standardSatellite()with new configuration parameters for color customization, landmark icons visibility, point-of-interest styling, road appearance, and administrative boundaries. - Expose
LineLayer.lineCutoutFadeWidthto control route line cutout fade width. - Expanded Expression DSL capabilities with support for control flow constructs in
ExpressionArgumentBuilder. Now supportsif/elseconditions,forloops, optionals, and#availablechecks within expression builders. This allows more natural and readable expression construction, reducing boilerplate code when building complex map styling expressions.
- Fix incorrect color rendering for gradients and interpolations with zero alpha channel.
- Add tap gesture support to
Markercomponent withonTapGesturemodifier
- Fix infinite loop in attribution button tint color configuration.
- Add configuration option to configure attribution button tint color.
- Expose
LineLayer.lineCutoutOpacityandLineLayer.lineCutoutWidthto make route lines visible through obstructing 3D buildings and other aboveground features.
- Introduce experimental
Markerconvenience API in Swift UI. UseMarkerto quickly add aMapViewAnnotationpin at the specified coordinates with custom text and color.
Map {
Marker(coordinate: CLLocationCoordinate2D(...))
.text("My marker")
.color(.blue)
.stroke(.orange)
}- Added new
splitexpression, which returns an array of substrings from a string, split by a delimiter parameter. - Allow option to set SDF on a
PointAnnotationimage in Style DSL
- Added new
FillLayer.fillPatternCrossFade,FillExtrusionLayer.fillExtrusionPatternCrossFade,LineLayer.fillExtrusionPatternCrossFadeproperties.
-
PointAnnotation.iconImageCrossFadehas been deprecated and setting value to it will not have any impact. UsePointAnnotationManager.iconImageCrossFadeTransitioninstead. -
The Interactions and Featuresets API is promoted from experimental. The new API allows you to add interaction handlers to layers, Standard Style featuresets (POI, Buildings and Place Labels), and the map itself in the consistent way. You can control the propagation of events, tappable area, and the order of event handling.
-
The experimental style
MapStyle.standardExperimentalis removed. UseMapStyle.standardinstead. -
Methods
GestureManager.onMapTap,GestureManager.onMapLongPress,GestureManager.onLayerTap,GestureManager.onLayerLongPressand their SwiftUI counterparts are deprecated. UseTapInteractionandLongPressInteractioninstead. -
Add new
VectorSource.promoteId2andGeoJSONSource.promoteId2. DeprecateVectorSource.promoteIdandGeoJSONSource.promoteId. The newer version support the expression variant of promoteId, which can be used to dynamically nominate IDs to the features.
// Before (SwiftUI)
Map()
.onMapTapGesture { context in
// Handle tap on map
}
.onLayerLongPressGesture("a-layer-id") { feature, context in
// Handle press on a layer
return true
}
// After (SwiftUI)
Map {
TapInteraction { feature in
// Handle tap on map
return true
}
LongPressInteraction(.layer("a-layer-id")) { feature, context in
// Handle press on a layer
return true
}
// Bonus: If you use Standard style, new API allows to handle tap on POI, Buildings and Place Labels
TapInteraction(.standardPoi) { poi, feature in
print("Tap on \(poi.name)")
return true
}
}// Before (UIKit)
mapView.gestures.onMapTap.observe { context in
// Handle Tap on Map
}.store(in: &cancelables)
mapView.gestures.onLayerLongPress("a-layer-id") { feature, context in
// Handle Long press
return true
}
// After (UIKit)
mapView.mapboxMap.addInteraction(TapInteraction { context in
// Handle tap on map
return true
})
mapView.mapboxMap.addInteraction(LongPressInteraction(.layer("a-layer-id")) { feature, context in
// Handle long press on a layer
return true
})
// Bonus: If you use Standard style, new API allows to handle tap on POI, Buildings and Place Labels
mapView.mapboxMap.addInteraction(TapInteraction(.standardPoi) { poi, feature in
print("Tap on poi \(poi.name)")
return true
})- Expose new experimental properties:
CircleLayer.circleElevationReference,FillLayer.fillConstructBridgeGuardRail,FillLayer.fillBridgeGuardRailColor,FillLayer.fillTunnelStructureColor. - Expose new
showLandmarkIconsproperty inMapStyle.standard. - New example for elevated spiral line. Utilized the experimental API
LineLayer/linezOffset.
- Expose an experimental API to define a non-rectangular screen culling shape(
MapboxMap.screenCullingShape).
- Expose
graphicsPrograms,graphicsProgramsCreationTimeMillisandfboSwitchCountforCumulativeRenderingStatistics. - Update CoreMaps to 11.12.0-beta.1 and Common to 24.12.0-beta.1
- Update CoreMaps to 11.11.0 and Common to 24.11.0
top-image,bearing-image, andshadow-imageproperties onLocationIndicatorLayerare now paint properties instead of layout properties.
- Expose experimental API for setting ColorTheme on style imports.
- Expose use-theme properties for all annotation types and Puck3D layer.
- Update CoreMaps to 11.11.0-rc.2.
- Update Common to 24.11.0-rc.2.
- Reduce MapboxMaps binary size by removing debug symbols. Complete dSYM files are still available in the XCFramework.
- Support panning and pinch gestures on trackpads.
- Update CoreMaps to 11.10.2.
- Update CoreMaps to 11.10.0.
- Expose experimental ColorTheme API to set style wide color theme. A color theme modifies the global colors of a style using a LUT (lookup table) for color grading. Pass the image either as a base64-encoded string or as UIImage:
let mapView = MapView()
mapView.mapboxMap.setMapStyleContent {
ColorTheme(base64: "base64EncodedImage") // or use an uiimage shortcut ColorTheme(uiimage: lutImage)
}Note: Each style can have only one ColorTheme. Setting a new theme overwrites the previous one. Further details can be found in documentation for ColorTheme
- Promote
ClipLayer.clipLayerTypesandClipLayer.clipLayerScopeto stable. - Remove experimental
DirectionalLight.shadowQuality. - Add experimental
ViewAnnotationManager.viewAnnotationAvoidLayersfor specifying layers that view annotations should avoid. The API currently only supports line layers. - Add support for the
maxOverscaleFactorForParentTilesproperty inCustomRasterSourceandCustomGeometrySource, allowing greater control over tile overscaling behavior when rendering custom raster tiles. - Add support for experimental *-use-theme property that allow to override the color theme set on the Map. This is experimental and have several limitations - currently expressions are not supported. Color properties in Lights, Rain, Snow are not supported. *-use-theme for layer applied only after zoom level change.
- Update CoreMaps to 11.10.0-rc.1 and Common to 24.10.0-rc.1.
- Mark
SymbolElevationReference,FillExtrusionBaseAlignment,FillExtrusionHeightAlignment,ModelScaleMode,ModelType,ClipLayerTypes,BackgroundPitchAlignmenttypes as Experimental. Initially they were exposed as stable by mistake. If you use them, please importMapboxMapswithExperimentalSPI:
@_spi(Experimental) import MapboxMaps
- Localize geofencing attribution dialog.
- Support dictionary expression literals.
- Bump minimal deployment target from 12.0 to 14.0.
- [SwiftUI] Expose new
slot()method on annotation groups that takesSlotinstead ofString. Use the type with annotationGroups:
swift
CircleAnnotationGroup {}
// old
.slot("middle")
// new
.slot(.middle)
- Introduce
ViewAnnotation.priority, deprecateViewAnnotation.selected. Use this property to define view annotation sort order. - Introduce
ViewAnnotation.minZoomandViewAnnotation.maxZoom. Use these properties to configure zoom-level specific view annotations. - Update CoreMaps to 11.10.0-beta.2 and Common to 24.10.0-beta.2.
- Update CoreMaps to 11.9.3.
- Update CoreMaps to 11.9.2.
- Remove experimental SPI from
StyleImage. - Promote ClipLayer to stable.
- Fix the encoding/decoding key for
Rain/centerThinningandSnow/centerThinning. - Update CoreMaps to 11.9.0 and Common to 24.9.0.
- Add a new API to disable custom resizing implementation of the MapView. To disable the custom resizing implementation, set
MapView.resizingAnimationto.none. - Add
to-hslaexpression support.
-
Mark
symbolElevationReference,symbolZOffset,lineTrimColor,lineTrimFadeRange,lineZOffsetas Experimental in AnnotationManagers. This is potentially breaking change, however those properties are not marked as experimental only in AnnotationManagers by mistake. In order to continue use them use the following import@_spi(Experimental) import MapboxMaps. -
Add two separate Geofence examples in SwiftUI -
GeofencingPlaygroundandGeofencingUserLocation -
Add support for Base and Height alignment in FillExtrusionLayer.
-
Add support for
pitchAlignmentin BackgroundLayer. -
Add support for
zOffsetin FillLayer, PolygonAnnotation[Manager] and PolygonAnnotationGroup. -
Add a property emphasisCircleGlowRange to LocationIndicatorLayer to control the glow effect of the emphasis circle – from the solid start to the fully transparent end.
-
Fix a crash on calling
LocationIndicatorLayer/location(coordinate:) functiondue to missing 0 altitude value. -
Add a new Expression initializer
init(_ operator: Operator, _ arguments: ExpressionArgumentConvertible...)to simplify the creation of expressions with multiple arguments. That initializer doesn't require to wrap arguments inArgumentcases. For example,Exp(.eq, Exp(.get, "extrude"), "true"). -
Expose a
TileStore/clearAmbientCache()method to clear ambient cache. -
Add new experimental
radiusparameter toTapInteraction,LongPressInteractionand interaction managers to control the radius of a tappable area. -
Add a way to specify image expression options.
-
Bump core maps version to 11.9.0-beta.1 and common sdk to 24.9.0-beta.1
-
Add new experimental APIs to control precipitation rendering. Snow and Rain are available now with an
@_spi(Experimental)import prefix. -
Add a way to filter attribution menu items.
- Add two separated Geofence examples in SwiftUI -
GeofencingPlaygroundandGeofencingUserLocation - Expose
lineElevationReference,lineCrossSlope,iconSizeScaleRange,textSizeScaleRangeas experimental - Mark
ClipLayeras stable
- Fix the bug when MapView would ignore the new bounds size if there are more than a single resizing event in the animation.
-
[SwiftUI] Fixed crash when ForEvery was used with duplicated IDs.
-
Introduce experimental Geofencing API. Implementation example: GeofencingExample.swift
-
Refactor of the experimental Interactions and Featuresets API:
InteractiveFeatureis renamed toFeaturesetFeature.- Introduce new
StandardPoiFeature,StandardBuildingsFeature,StandardPlaceLabelsFeature. - Introduce new
FeaturesetDescriptor.
-
Generate
MapStyle.standardandMapStyle.standardSatellitefrom the style specification. Added the newStandardFonttype to represent the font family in these configurations. If you used a string variable, update your code:
// Old:
Map().mapStyle(.standard(font: fontValue))
/// New:
Map().mapStyle(.standard(font: StandardFont(rawValue: fontValue)))
Map().mapStyle(.standard(font: .lato))- Introduce experimental property
MapboxMap.styleGlyphURL. Use this property to apply custom fonts to the map at runtime, without modifying the base style. - Fix a console warning (
Source x missing for layer x) when using annotation managers.
- Fix the bug where displaying ViewAnnotation and setting a feature state simultaneously could result in an unapplied feature state.
- Remove
MapboxMaps-Swift.hfrom MapboxMaps framework, this will disable ObjC interop for MapboMaps. - Update CoreMaps to 11.7.0 and Common to 24.7.0
- Add experimental
FillExtrusionLayer.fillExtrusionLineWidththat can switches fill extrusion rendering into wall rendering mode. Use this property to render the feature with the given width over the outlines of the geometry.
-
Expose data-driven properties on annotation managers. Now it's possible to set data-driven properties globally on annotation manager and specify per-annotation overrides. Previously user had to specify those properties on each annotation and couldn't specify them globally
-
Added new experimental interactive features API. Interactive features allow you to add interactions to both layers, the map itself, or the features defined in the imported styles, such as Standard Style. The new API supersedes the Map Content Gesture API and makes it cross-platform.
-
Rename the
MapContentGestuereContextto theInteractionContext -
Introduce a new
RenderedQueryGeometrytype to replace multipleMapboxMaps.queryRenderedFeaturesoverloads. -
[SwiftUI] Introduce new experimental
FeatureStateprimitive. -
Expose data-driven properties on annotation managers. Now it's possible to set data-dirven properties globally on annotation manager and specify per-annotation overrides. Previosuly user had to specify those properties on each annotation and couldn't specify them globally
CircleAnnotationGroup(circles, id: \.id) { circle in
CircleAnnotation(centerCoordinate: circle.coordinate)
.circleColor(circle.color)
.circleRadius(10)
.circleStrokeWidth(1)
.circleStrokeColor(.black)
}The problem with the above approach is that most of the properties are just duplicated for each annotation, which can lead to large memory overhead in case of big datasets. In order to solve this issue and provide more versatile API the following approach is now possible, which is visually identical to previous snippet, but more performant.
CircleAnnotationGroup(circles, id: \.id) { circle in
CircleAnnotation(centerCoordinate: circle.coordinate)
.circleColor(circle.color)
}
.circleRadius(10)
.circleStrokeWidth(1)
.circleStrokeColor(.black)Same applies for imperative API. In this case each even annotation will have random color, but others will use the global default specified in the annotation manager.
let circleAnnotationManager = mapView.annotations.makeCircleAnnotationManager()
var annotations = [CircleAnnotation]()
for i in 0...2000 {
var annotation = CircleAnnotation(centerCoordinate: .random)
if i % 2 == 0 { annotation.circleColor = StyleColor(.random) }
annotations.append(annotation)
}
circleAnnotationManager.circleColor = .blue-
Improve memory reclamation behavior when using partial GeoJSON update API.
-
Update Turf to 3.0.0 version. That version introduce breaking change – there is no more
RawRepresentableconformances forArrayandDictionarysystem types. If you were relying on theinit(rawValue:)function orrawValueproperty, you can use the substitution instead:init(rawValue:)->init(turfRawValue:)rawValue->turfRawValue
-
Remove experimental
model-front-cutoffproperty fromModelLayer -
Bump core maps version to 11.7.0-beta.2 and common sdk to 24.7.0-beta.2
-
Expose experimental
ClipLayer.clipLayerScope,SymbolLayer.symbolElevationReferenceandSymbolLayer.symbolZOffset. -
Most of public value types was marked as Sendable now, to facilitate adoption of Swift 6 concurrency model for SDK clients.
-
autoMaxZoomproperty exposed for GeoJSONSource to fix rendering issues withFillExtrusionLayerin some cases
- Expose getters for
MapOptions.orientation,MapOptions.constrainModeandMapOptions.viewportMode. - Expose
lineTrimColorandlineTrimFadeRangeonLineLayerwhich allow to set custom color for trimmed line and fade effect for trim. Update navigation example to use those properties.
ClipLayerpropertyclipLayerTypesis not updated in runtime. The fix is expected to land in stable 11.6.0.
- Expose new Standard Satellite style. Add new parameters to the Standard Style. With new Standard Style API it's possible to apply color themes on the map, hide/show road labels and show/hide 3D models. With new Standard Satellite style it's possible to show satellite imagery and also apply some configurations similar to Standard Style.
- Fix bug where updating MapStyle didn't update the configuration properties.
- Fix symbols with occlusion crashing on iOS simulators
ClipLayerpropertyclipLayerTypesis not updated in runtime. The fix is expected to land in 11.6.0-rc.1.
- SwiftUI API marked as stable
- Expose experimental
ClipLayerto remove 3D data (fill extrusions, landmarks, trees) and symbols. CustomRasterSourceAPI updated, nowCustomRasterSourceOptionsaccepts protocolCustomRasterSourceClient, enabling direct rendering intoCustomRasterSourcetiles. To achieve behavior similar to previous releases one may construct instance ofCustomRasterSourceClientas shown below:
CustomRasterSourceOptions(tileStatusChangedFunction: { tileID, status in }) // Before
CustomRasterSourceOptions(clientCallback: CustomRasterSourceClient.fromCustomRasterSourceTileStatusChangedCallback { tileID, status in }) // Now- Introduce new
ViewAnnotation.allowZElevateandMapViewAnnotation.allowZElevateproperties. When set to true, the annotation will be positioned on the rooftops of buildings, including both fill extrusions and models. - Deprecate
MapView.presentsWithTransactionandMap.presentsWithTransactionin favor ofMapView.presentationTransactionModeandMap.presentationTransactionMode. The new defaultPresentationTransactionMode.automaticupdates thepresentsWithTransactionautomatically when need to optimize performance. If you used theMapView.presentsWithTransactionwith View Annotations, now you can safely remove this option:
Map {
MapViewAnnotation(...)
}
.presentsWithTransaction(true) // Remove thisIn case you need to preserve the old default behavior use presentationTransactionMode = .async:
mapView.presentationTransactionMode = .async // UIKit
Map().presentationTransactionMode(.async) // SwiftUI- MapboxMaps XCFramework structure now properly constructed for
maccatalystplatform and code signing issues was eliminated.
- Improved
line-patternprecision - Fixed
CustomRasterSourcerendering when camera shows anti-meridian or multiple world copies.
- Update CoreMaps to the 11.5.1 version.
- Use new
LineJoin.nonein conjunction with an image as alinePatternvalue to display repeated series of images along a line(e.g. dotted route line). - Deprecate
Expressionin favor ofExpto avoid name clash withFoundation.Expression.
- The CustomRasterSource API has been updated. It no longer includes a cache and now provides notifications about alternative tiles that can be used when the ideal ones are unavailable.
- Expose text-occlusion-opacity, icon-occlusion-opacity, line-occlusion-opacity, model-front-cutoff, lineZOffset as experimental.
- Add min/max/default values for most of the style properties.
- Fix compilation of Examples and MapboxMaps in Xcode 16
- Improve stability of symbol placement when using
FollowPuckViewportState. - Expose
clusterMinPointsproperty forGeoJSONSourceand forClusterOptions - Root properties (
Atmosphere,Lights,Projection,Terrain,Transition) are now revertible for all styles. - Introduce raster particles rendering example
- Bump core maps version to 11.5.0-beta.1 and common sdk to 24.5.0-beta.4
- Root properties (
Atmosphere,Lights,Projection,Terrain,Transition) are now revertible for all styles.
- Live performance metrics collection. Mapbox Maps SDK v11.4.0 collects certain performance and feature usage counters so we can better benchmark the MapboxMaps library and invest in its performance. The performance counters have been carefully designed so that user-level metrics and identifiers are not collected.
- Bump core maps version to 11.4.0 and common sdk to 24.4.0
- Bump core maps version to 11.4.0-rc.2 and common sdk to 24.4.0-rc.2
- Added camera(for:) deprecation for several methods. Added
CameraForExampleshowcasing camera(for:) usageq - Expose experimental
RasterParticleLayerwhich is suitable for displaying precipitation or wind on the map - Expose the list of added
ViewAnnotation - Bump core maps version to 11.4.0-rc.1 and common sdk to 24.4.0-rc.1.
- Bump common sdk to 24.4.0-beta.3.
- Bump core maps version to 11.4.0-beta.2 and common sdk to 24.4.0-beta.2.
MapboxMap.loadStyle()andSnapshotter.loadStyle()behaviour is rolled back to pre 11.4.0-beta.1 state.
- In v11.4.0-beta.1, setting a
RasterLayer’srasterColorproperty with an expression will block the layer from rendering. This issue will be resolved in v11.4.0-rc.1.
In this release, we introduce the new Declarative Styling API for UIKit and SwiftUI. This change is based on MapContent introduced for SwiftUI; therefore, it has been restructured. The changes are compatible; however, in some rare cases, you may need to adjust your code.
- [SwiftUI]
MapContentnow supports custom implementations, similar to SwiftUI views. TheMapContentprotocol now requires thevar body: some MapContentimplementation. - [SwiftUI] PointAnnotation and Puck3D property-setters that consumed fixed-length arrays reworked to use named properties or platform types for better readability:
// Before
PointAnnotation()
.iconOffset([10, 20]) // x, y
.iconTextFitPadding([1, 2, 3, 4]) // top, right, bottom, left
Puck3D()
.modelScale([1, 2, 3]) // x, y, z
// After
PointAnnotation()
.iconOffset(x: 10, y: 20)
.iconTextFitPadding(UIEdgeInsets(top: 1, left: 4, bottom: 3, right: 2))
Puck3D()
.modelScale(x: 1, y: 2, z: 3)StyleImportConfigurationwas removed from public API, theMapStylenow contains the configuration directly.TransitionOptionsis now a Swiftstructrather than an Objective-Cclass.
- All the style primitives can now be used as
MapContentin SwiftUI.
@_spi(Experimental) MapboxMaps
Map {
LineLayer(id: "traffic")
.lineColor(.red)
.lineWidth(2)
}- UIKit applications can now use the
setMapStyleContentto use style primitives:
@_spi(Experimental) MapboxMaps
mapView.mapboxMap.setMapStyleContent {
LineLayer(id: "traffic")
.lineColor(.red)
.lineWidth(2)
}-
Allow to assign slot to 2D and 3D location indicators.
-
Allow observing start/stop event of
CameraAnimatorYou can observe start/stop event ofCameraAnimatorby using newCameraAnimationsManagerAPIs as shown below// Observe start event of any CameraAnimator owned by AnimationOwner.cameraAnimationsManager mapView.camera .onCameraAnimatorStarted .owned(by: .cameraAnimationsManager) .observe { cameraAnimator in // Handle camera animation started here. } .store(in: &cancelables) // Observe finished events of any CameraAnimator mapView.camera .onCameraAnimatorFinished .observe { animator in // Handle camera animation stopped here. } .store(in: &cancelables)
You can also observe directly on an instance of
CameraAnimatorwhen using low-level camera APIs to create a custom animator// Declare an animator that changes the map's bearing let bearingAnimator = mapView.camera.makeAnimator(duration: 4, curve: .easeInOut) { (transition) in transition.bearing.toValue = -45 } bearingAnimator.onStarted.observe { // Bearing animator has started. }.store(in: &cancelables)
-
Allow adding slots at runtime.
-
Expose API to interact with style imports using Declarative Styling and regular imperative API.
-
Expose
StyleImportfor declarative styling asMapStyleContent. -
Expose
removeStyleImport,moveStyleImport,updateStyleImport,addStyleImportmethods onStyleManager -
Allow assigning layerPosition to 2D and 3D location indicators in imperative API.
-
Make Puck2D and Puck3D to be positioned according to relative layer position in declarative API instead of always top-most position.
-
Add codesign for XCFrameworks.
-
MapboxMap.loadStyle()andSnapshotter.loadStyle()now correctly call thecompletionclosure.
- Introduce an experimental Style DSL, enabling developers to add map style content like Sources, Layers, Style Images, Terrain, Light and Atmosphere to their map style at runtime in a declarative pattern. See the documentation here for more information. For SwiftUI users, this Style DSL provides a more natural approach to manipulating content. [tile store] Expose API for estimating Tile Region downloads and storage size.
- [tile store] Expose API for estimating Tile Region downloads and storage size.
- Remove metal view's contentScaleFactor assertion.
- Bump core maps version to 11.3.0-rc.1 and common sdk to 24.3.0-rc.1.
- Update the minimum Xcode version to 15.2 (Swift 5.9).
- Add
onClusterTapandonClusterLongPressto AnnotationManagers(UIKit) and AnnotationGroups(SwiftUI) which support clustering - Add annotations drag handlers callbacks
dragBeginHandler,dragChangeHandler,dragEndHandlerto all Annotation types. - [SwiftUI] Expose
captureSnapshotonMapProxywhich allows to capture SwiftUI Map snapshot usingMapReader - [SwiftUI] Expose
opaqueandframeRateon SwiftUI Map - [SwiftUI] Add
allowHistTestingmodifier onMapViewAnnotation. - [SwiftUI] Fix view annotations positioning on
.ignoresSafeArea(.all) - Add
includeOverlaysparameter toMapView.snapshot() - Fix taps propagation on
ViewAnnotationandMapViewAnnotation. - Added Attribution and Telemetry pop-up dialogs and compass view content description translations for Arabic, Belarusian, Bulgarian, Catalan, Chinese Simplified, Chinese Traditional, Czech, Danish, Dutch, French, Galician, German, Hebrew, Italian, Japanese, Korean, Lithuanian, Norwegian, Polish, Belarusian, Russian, Spanish, Swedish, Ukranian and Vietnamese.
- Bump core maps version to 11.3.0-beta.1 and common sdk to 24.3.0-beta.1.
- Bump core maps version to 11.2.0 and common sdk to 24.2.0.
- Fix Map and encompassing List scroll at the same time
- visionOS small enhancements
- vision OS support. 🚀
- Add easing curve parameter to
CameraAnimationsManager.fly(to:duration:curve:completion), makeTimingCurvepublic with few more options. - Expose
MapboxMap.centerAltitudeModeand ensure correctcenterAltitudeModeon gesture ending. - Expose extra configuration methods for
MapboxMap:setNorthOrientation(_:),setConstrainMode(_:)andsetViewportMode(_:). Use them to configure respective map options after creating a map view. - Expose
MapboxMap.reduceMemoryUse()which can be used in situations when it is important to keep the memory footprint minimal. - Expose
MapboxMap.isAnimationInProgressandMapboxMap.isGestureInProgressto query current status of both built-in and custom camera animations and gestures. - Expose experimental
CustomRasterSourceand non-experimentalCustomGeometrySourceas regularSource's providing a better way to work with them and also allow for using them in Style DSL. - Introduce
tileCacheBudgetproperty onGeoJsonSource,RasterSource,RasterDemSource,RasterArraySource,VectorSource,CustomGeometrySource, andCustomRasterSource. MapboxMaps/setTileCacheBudget(size:)will now use theTileCacheBudgetSizeproperty, the older method withTileCacheBudgethas been deprecated and will be removed in a future major release.- Introduce
SymbolLayer.iconColorSaturationAPI. - Introduce experimental
RasterLayer.rasterElevationAPI. - Introduce experimental
MapboxMap.collectPerformanceStatisticsallowing to collect map rendering performance statistics, both for UIKit and SwiftUI.
- Fix MapView flickering during resizing.
- Fix glitch in chained camera animations.
- Build XCFramework with
SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NOflag to avoid serialized search paths in Swift modules. - Fixed a crash that occurs when annotations have duplicate identifiers.
- Bump Turf version to
2.8.0. - Bump minimum Xcode version to
14.3.1.
- Add
customDatafield in Annotaion and deprecateuserInfo.userInfobehaviour rolled back to v10 behaviour. - Fixed a bug where the attribution dialog does not appear when there is a presented view controller.
- Make padding optional in
MapboxMap.camera(for:padding:bearing:pitch:maxZoom:offset:)andMapboxMap.camera(for:padding:bearing:pitch:). - Update CoreMaps to 11.1.0 and Common to 24.1.0
- Fix the bug where the annotation could disappear when it is dragged.
-
RasterArraySource.rasterLayersis alwaysnilfor any source. Workaround: useMapboxMap.sourceProperty(for:property:).valueto fetch a value ofRasterArraySource.rasterLayers. -
Expose method to get coordinate info for point(s):
MapboxMap.coordinateInfo(for:)andMapboxMap.coordinatesInfo(for:). -
[SwiftUI] Expose
Map.gestureHandlers()for handling Map gesture events. -
Introduce experimental
RasterArraySource, along withRasterLayer.rasterArrayBand. -
Introduce
-emissiveStrengthattribute forFillExtrusionLayer,HillShadeLayerandRasterLayer. -
Update MapboxCoreMaps to v11.1.0-beta.1 and MapboxCommon to v24.1.0-beta.2
- Introduce
Slotfor assigning a layer to a slot. - Update MapboxCoreMaps to v11.0.0 and MapboxCommon to v24.0.0
-
Note: SwiftUI support is an experimental feature, its API may be changed until it stabilizes.
-
[SwiftUI] Fixed point annotations clustering.
-
[SwiftUI] Viewport inset system was refactored:
- The
Viewport.inset(...)function was removed in favor of theViewport.padding(...) - The
Viewport.inset(...)previously had anignoringSafeAreaparameter which allowed developers to specify if an edge safe area inset should be accounted for in padding calculation. Starting with this version, instead of this parameter there is aMap.usesSafeAreaInsetsAsPadding(_:)modifier that enables or disables this for all edges.
- The
- [SwiftUI] New
Map.additionalSafeAreaInsets(...)modifier that adds additional global safe area insets for the map. Use them to display any UI elements on top of the map. The additional safe area will automatically be accounted for in camera padding calculation in every Viewport. - Added
allowOverlapWithPuckandignoreCameraPaddingoptions toViewAnnotationandMapViewAnnotation.
- [SwiftUI] Fix bug when
Viewport.inset(...)didn't use safe area insets on the first load. - [SwiftUI] Fix map basic coordinator clinging to the first subscriptions.
MapboxMap.loadStylemethods changed error type fromMapLoadingErrortoError.OverviewViewportStateOptions.coordinatesPaddingis renamed toOverviewViewportStateOptions.geometryPadding.- [SwiftUI] ``Viewport.overview(geometry:bearing:pitch:coordinatesPadding:maxZoom:offset:)
is renamed toViewport.overview(geometry:bearing:pitch:geometryPadding:maxZoom:offset:)` - Bearing indication on user location puck is disabled by default to reduce amount map redraws.
To re-enable bearing update rendering, set
mapView.location.options.puckBearingEnabledtotrue. - The default behavior of resetting the viewport to idle is changed. Previously viewport was reset to idle when the user touched the map for longer than 150 ms. Now it will happen when the user pans the map. If the desired behavior is different, you can disable the default by setting
mapView.viewport.options.transitionsToIdleUponUserInteractiontofalseand implementing any gesture that callsmapView.viewport.idle().
-
Refactor
MapboxMap.loadStyleto cancel previous style loads when called multiple times. -
New experimental
StyleManager.load(mapStyle:transition:completion)method to loadMapStyleinMapboxMap, orSnapshotter:mapboxMap.load(mapStyle: .standard(lightPreset: .dawn, showRoadLabels: false)) { _ in print("Style is loaded") }
-
Support
slotfor annotation managers and annotation groups. -
[SwiftUI] Annotation groups can be created with static list of annotations. In the example below polyline annotation group displays two annotations on the same layer.
Map { PolylineAnnotationGroup { PolylineAnnotation(lineCoordinates: route.coordinates) .lineColor("blue") if let alternativeRoute { PolylineAnnotation(lineCoordinates: alternativeRoute.coordinates) .lineColor("green") } } .lineCap(.round) .slot("middle") }
-
[SwiftUI] Expose
transitionsToIdleUponUserInteractionmodifier. -
Introduce typed API for assining a layer to a slot.
-
Introduce
Slotfor assining a layer to a slot. -
Introduce
Slotfor assigning a layer to a slot.
- Fix issue where 2D puck images are not getting updates.
- [SwiftUI] Fixed issue when viewport inset with safe area is calculated incorrectly.
- Fixed issue when quick interaction didn't lead to resetting viewport to
idle.
- Style projection can be undefined for styles that do not explicitly specify it, so
MapboxMap.projectionhas become optional. - View Annotation API is changed:
ViewAnnotationOptions.geometrywas removed in favor ofViewAnnotationOptions.annotatedFeature.ViewAnnotationOptions.associatedFeatureIdwas removed. UseAnnotatedFeature.layerFeature(layerId:featureId:)withViewAnnotationOptions.annotatedFeatureto bind View Annotation to features rendered by any layer.- [SwiftUI] Use
MapViewAnnotationinstead ofViewAnnotationto display view annotations in SwiftUI.
OverviewViewportStateOptions.paddingis renamed toOverviewViewportStateOptions.coordinatePadding, theOverviewViewportStateOptions.paddingnow represents the camera padding.
- New
ViewAnnotationclass is added for simplifying View Annotation management. It is a simple to use replacement for the oldViewAnnotationOptions. It automatically updates size and other properties of annotations, and provides new features:- Automatic anchor position from specified
ViewAnnotation.variableAnchorconfigurations. - Supports displaying not only at point features, but also at lines and polygons.
- Automatic anchor position from specified
- Support Dynamic View Annotations in SwiftUI.
- Add
MapboxMaps.camera(for:camera:coordinatesPadding:maxZoom:offset). - Add
MapViewDebugOptions.paddingdebug option. - Add
maxZoomandoffsetparameters toOverviewViewportStateOptions.
- Fix issue when transition to Overview Viewport resulted in double padding.
- [SwiftUI] Fix issue when Overview Viewport is incorrect if set as initial viewport.
- Add a new CustomLayer API to simplify manipulation of layers with custom rendering (aka "CustomLayerHost").
- The following APIs have been promoted to stable:
LineLayer/lineDepthOcclusionFactor,LineLayer/lineDepthOcclusionFactorTransition,LineLayer/lineEmissiveStrengthandLineLayer/lineEmissiveStrengthTransitionSymbolLayer/iconImageCrossFade,SymbolLayer/iconImageCrossFadeTransition,SymbolLayer/iconEmissiveStrength,SymbolLayer/iconEmissiveStrengthTransition,SymbolLayer/textEmissiveStrengthandSymbolLayer/textEmissiveStrengthTransitionBackgroundLayer/backgroundEmissiveStrengthandBackgroundLayer/backgroundEmissiveStrengthTransitionCircleLayer/circleEmissiveStrengthandCircleLayer/circleEmissiveStrengthTransitionFillLayer/fillEmissiveStrengthandFillLayer/fillEmissiveStrengthTransitionAmbientLight,DirectionalLightand related APIs.
- Fix memory leak in SwiftUI.
- Expose
MapViewDebugOptionsin SwiftUI.
StyleColor.red,StyleColor.green,StyleColor.blue,StyleColor.alphaare not in use anymore and got removed.- The
syncSourceAndLayerIfNeededmethod in every annotation manager (e.gPointAnnotationManagerand others) was removed from the public API.
- Add MSAA support with the
MapInitOptions/antialiasingSampleCountproperty. StyleColor- add support for all color formats as defined by Mapbox Style Spec.- Introduce experimental Custom Raster Source APIs:
StyleManager/addCustomRasterSource,StyleManager/setCustomRasterSourceTileData,StyleManager/invalidateCustomRasterSourceTile,StyleManager/invalidateCustomRasterSourceRegion. - Introduce new Map Content Gesture System.
- Add an experimental
MapView/cameraDebugOverlaywhich returns a UIView displaying the current state of the camera. - Add
MapView/debugOptionswhich wraps the debugOptions on the underlying map inMapViewDebugOptions. An additional.cameradebug option has been added, which adds aCameraDebugViewto the map to see the current camera state.MapboxMap/debugOptionshas been deprecated; access the underlying map debug options throughmapView.debugOptions.nativeDebugOptionsinstead.
MapboxMap.dragStart()andMapboxMap.dragEnd()are not in use anymore and got removed.- Remove
MapOptions/optimizeForTerrainoption. Whenever terrain is present layer order is automatically adjusted for better performance.
- Improve map camera and gestures when terrain is used to fix camera bumpiness and map flickering.
- Expose a method to remove tile region with a completion:
TileStore.removeTileRegion(forId:completion:). - Bump core maps version to 11.0.0-beta.4 and common sdk to 24.0.0-beta.4.
- Fix
modelCastShadowsandmodelReceiveShadowsoptions ofPuck3DConfigurationbeing ignored. - Fix
StyleColorfailing to initialize with non-sRGB color spaces by converting suppliedUIColors tosRGBcolor space by default.
- Introduce experimental
MapboxRecorder, which allows recording of the map and replaying custom scenarios. - Expose
slotproperty onLayerprotocol. - Bump core maps version to 11.0.0-beta.3 and common sdk to 24.0.0-beta.3.
- Add privacy policy attribution dialog action.
- Introduce
hsl,hslacolor expression. - Introduce
randomexpression. - Introduce
measureLightexpression lights configuration property. - Introduce
LineLayer/lineBorderColor,LineLayer/lineBorderWidthAPIs. - Introduce
SymbolLayer/iconImageCrossFadeAPI. - Introduce experimental
BackgroundLayer/backgroundEmissiveStrength,CircleLayer/circleEmissiveStrength,FillLayer/fillEmissiveStrength,LineLayer/lineEmissiveStrength,SymbolLayer/iconEmissiveStrength,SymbolLayer/textEmissiveStrength,ModelLayer/modelEmissiveStrength,ModelLayer/modelRoughness,ModelLayer/modelHeightBasedEmissiveStrengthMultiplierAPIs. - Introduce experimental
FillExtrusionLayer/fillExtrusionAmbientOcclusionWallRadius,FillExtrusionLayer/fillExtrusionAmbientOcclusionGroundRadius,FillExtrusionLayer/fillExtrusionAmbientOcclusionGroundAttenuation,FillExtrusionLayer/fillExtrusionFloodLightColor,FillExtrusionLayer/fillExtrusionFloodLightIntensity,FillExtrusionLayer/fillExtrusionFloodLightWallRadius,FillExtrusionLayer/fillExtrusionFloodLightGroundRadius,FillExtrusionLayer/fillExtrusionFloodLightGroundAttenuation,FillExtrusionLayer/fillExtrusionVerticalScaleAPIs. - Rename
ViewporttoViewportManager. - Apply
ModelScaleMode.viewportto Puck3D configuration and remove the custom expression for themodelScaleof the puck. This means if you are using a constant forPuck3DConfiguration/modelScalein v10, you need to adjust this model-scale constant so the puck would be rendered correctly in v11, while this value depends on other configurations of your puck, we have found the new adjusted model-scale to fall between 10x-100x of the old value. - Add experimental
tileCovermethod to theSnapshotterthat returns tile ids covering the map. - Add optional
maxZoomandoffsetparameters toMapboxMap.camera(for coordinateBounds:).MapboxMap.camera(for coordinateBounds:),MapboxMap.camera(for coordinates:), andMapboxMap.camera(for geometry:)no longer return a padding value. Locationis splitted intoLocationandHeadingstructs, the location and heading data are now animated individually.- Replace
loadStyleJSON(_:completion:)/loadStyleJSON(_:completion:)with overloadedloadStyle(_:completion:). - Mark
Expression.Operator.activeAnchoras experimental. - Add transition options as a parameter to
loadStyle(...)methods. Expression.Operatoris now a struct with static variables instead of enum.- Add
MapboxMap.coordinate(s)Info(for:)for converting offscreen points into geographical coordinates. - Fixed an issue when
MapboxMap.point(for:)could return false negative result. - Remove
source,sourceLayer,filterproperties from theLayerprotocol requirement. - Bump core maps version to 11.0.0-beta.1.
- Refactor style Light API: introduce
AmbientLight,DirectionalLight,FlatLightand methods to set them. - Add expression support to
Layer.visibility. - Expose new APIs for working with style importing and configuration: getStyleImports(), removeStyleImport(forImportId:), getStyleImportSchema(forImportId:), getStyleImportConfigProperties(forImportId:), setStyleImportConfigPropertiesForImportId(:configs:), getStyleImportConfigProperty(forImportId:config:), setStyleImportConfigPropertyForImportId(:config:value:)
- Expose
slotproperty for allLayers to link layers from imported styles. - Convert Style properties enums into structs.
- Bump core maps version to 11.0.0-beta.2 and common sdk to 24.0.0-beta.2.
- Remove MetaKit reexport.
-
Remove unnecessary check before updating a geo json source.
-
Remove deprecated
LocationManager.updateHeadingForCurrentDeviceOrientation()method. -
Remove deprecated
MapEvents.EventKind. -
Make NSNumber extension internal.
-
Remove experimental
MapboxMap.setRenderCache(_:)method. -
Remove deprecated
GestureOptions.pinchRotateEnabled. -
Remove deprecated
Locationinitializer. -
Remove deprecated transition properties from layers.
-
Make
easeTo/flyToreturn non-optional cancelable token. -
Add
rotationcase toGestureTypeto be able to detect rotation separately from other gestures. -
Enable zoom during a drag gesture.
-
Fix bearing value is fluctuating between initial value and correct value during a rotation gesture.
-
Allows animation during any ongoing gestures.
-
Sync map size to the size of the metal view.
-
Fix missing feature properties for
nil/nullvalues. -
Added experimental
tileCovermethod toMapboxMapthat returns tile ids covering the map. -
Expose
ownerproperty forCameraAnimatorprotocol -
Updated core styles to the latest versions.
-
Merge
TilesetDescriptorOptionsandTilesetDescriptorOptionsForTilesets. To enable tileset descriptor creation for a list of tilesets that are not part of the original style useTilesetDescriptorOptions. -
Use
DataRefto pass snapshot and style image data by reference, improving performance -
Bumped min iOS version to 12.0
-
Expose a subset of ModelLayer APIs.
-
Protocol
LocationProvidernow requires class semantic for implementation. -
The Map events have been reworked:
-
Now all Map events payloads are serialize-free, which brings more type safety and eliminates possible deserialization errors;
-
The
MapboxMapandSnapshotternow exposeon-prefixed properties that allows you to subscribe to map events viaobserveandobserveNextmethods:mapboxMap.onCameraChanged.observe { [weak self] event in self?.camera = event.cameraState }.store(in: &cancelables) mapboxMap.onStyleLoaded.observeNext { [weak self] _ in self?.configureStyle() }.store(in: &cancelables)
-
The
AnyCancelableobject returned fromobserveandobserveNextshould be stored, otherwise the subscription will be immediately canceled; -
The same
on-prefixed properties can now be used asCombine.Publisher:import Combine mapboxMap.onCameraChanged .debounce(for: .milliseconds(500), scheduler: DispatchQueue.main) .map(\.cameraState) .sink { [weak self] cameraState in self?.camera = cameraState }.store(in: &cancellables)
-
Methods
MapboxMap.onEvery,MapboxMap.onNext,Snapshotter.onEvery,Snapshotter.onNexthave been deprecated; -
Methods
MapboxMap.observeandSnapshotter.observehave been removed.
-
-
Deprecate
PointAnnotationManager.iconTextFitandPointAnnotationManager.iconTextFitPaddingin favor ofPointAnnotation.iconTextFitandPointAnnotation.iconTextFitPadding. -
Remove deprecated
PuckBearingSourceand related APIs. -
Experimental API
MapboxMap/setMemoryBudgetwas renamed toMapboxMaps/setTileCacheBudgetand promoted to stable. -
Location consumer methods have been renamed to align with Swift API Design Guidelines. Use
addLocationConsumer(_:)andremoveLocationConsumer(_:)rather thanaddLocationConsumer(newConsumer:)andremoveLocationConsumer(consumer:). -
SourceTypeandLayerTypeare now structs with static variables instead of enums -
Remove
ResourceOptionsandResourceOptionsManager. IntroduceMapboxOptionsandMapboxMapsOptionsto handle application-level access token and other generic options.-
Mapbox's access token can now be set with
MapboxCommon.MapboxOptions. By default, MapboxMaps SDK will try to read the access token from app bundle's property list orMapboxAccessTokenfile when Maps service are initialized; if you wish to set access token programmatically, it is highly recommended to set it before initializing aMapView.import MapboxMaps MapboxOptions.accessToken = accessToken
-
TileStoreno longer requiresTileStoreOptions.mapboxAccessTokento be explicitly set. -
Configurations for the external resources used by Maps API can now be set with
MapboxMapsOptions:import MapboxMaps MapboxMapsOptions.dataPath = customDataPathURL MapboxMapsOptions.assetPath = customAssetPathURL MapboxMapsOptions.tileStoreUsageMode = .readOnly MapboxMapsOptions.tileStore = tileStore
-
To clear the temporary map data, you can use
MapboxMap.clearData(completion:)
-
-
Expose new 3D Lights API:
AmbientLightandDirectionalLight. -
TypeConversionError,SnapshotError, andViewAnnotationManagerErrorare now structs with static variables instead of enums -
Extend
Layerprotocol withvisibilityproperty. -
Add required
idproperty toSource. After that changeidshould be specified for source upon creation:let terrainSource = RasterDemSource(id: "terrain-source") mapView.mapboxMap.addSource(terrainSource)
-
Support string option in
GeoJSONSourceData. -
Allows passing
extraOptions(which must be a valid JSON object) when creatingStylePackLoadOptionsandTilesetDescriptorOptions. -
Deprecate
MapboxMap/styleandSnapshotter/style, from now on you can access Style APIs directly fromMapboxMapandSnapshotterinstance. -
Add a new API to enable Tracing with
Tracing.status = .enabled. CheckoutTracingreference to see more. -
Introduce
FillExtrusionLayer.fillExtrusionRoundedRoof,FillExtrusionLayer.fillExtrusionEdgeRadiusAPI. -
Introduce
line-depth-occlusionAPI. -
Introduce
FillExtrusionLayer/fillExtrusionRoundedRoof,FillExtrusionLayer/fillExtrusionEdgeRadiusAPI. -
Introduce
lineDepthOcclusionFactorAPI forLineLayers andPolylineAnnotiationManager. -
Add
Codablesupport toCameraOptions,CameraState,FollowPuckViewportStateBearing,FollowPuckViewportStateOptions. -
Expose new Style APIs for partial GeoJSON update:
MapboxMap.addGeoJSONSourceFeatures(forSourceId:features:dataId:)
MapboxMap.updateGeoJSONSourceFeatures(forSourceId:features:dataId:)
MapboxMap.removeGeoJSONSourceFeatures(forSourceId:featureIds:dataId:)- Update MapboxCoreMaps to 10.15.0 and MapboxCommon to 23.7.0.
- Fixed an issue when
MapboxMap.point(for:)could return false negative result.
- Update MapboxCoreMaps to 10.15.0-rc.1 and MapboxCommon to 23.7.0-rc.1.
- Fixed an issue when
MapboxMap.point(for:)could return false negative result.
- Remove unneeded synthesized initializers
- Update MapboxCoreMaps to 10.15.0-beta.1 and MapboxCommon to 23.7.0-beta.1.
- Added experimental
tileCovermethod to theSnapshotterthat returns tile ids covering the map. - Update MapboxCoreMaps to 10.14.0 and MapboxCommon to 23.6.0.
- Fix the issue with simultaneous zooming/panning during the pitch gesture.
- Fix the issue with black MapView when transparent style is used.
- Update MapboxCoreMaps to 10.14.0-rc.1 and MapboxCommon to 23.6.0-rc.1.
- Add a renamed flag to
PuckBearingSourceand related APIs. - Update MapboxCoreMaps to 10.14.0-beta.1 and MapboxCommon to 23.6.0-beta.1.
- Remove XCFramework binary dependency on MapboxMobileEvents.
- Update MapboxCoreMaps to 10.13.1 and MapboxCommon to 23.5.0
- [CarPlay] Fix display link is not correctly paused/resumed when map is added to a CarPlay dashboard scene.
- Update MapboxCoreMaps to 10.13.0-rc.1 and MapboxCommon to 23.5.0-rc.1.
- Remove unnecessary check before updating a geo json source.
- Enable zoom during a drag gesture.
- Fix bearing value is fluctuating between initial value and correct value during a rotation gesture.
- Allows animation during any ongoing gestures.
- Sync map size to the size of the metal view.
- Fix visual jitter when an annotation dragging ends.
- Fix missing feature properties for
nil/nullvalues. - Added experimental
tileCovermethod toMapboxMapthat returns tile ids covering the map. - Update MapboxCoreMaps to 10.13.0-beta.1 and MapboxCommon to 23.5.0-beta.1.
- Bump MapboxCoreMaps to 10.12.1
- Deprecate
Snapshotter.tileMode. - Bump MapboxCoreMaps to 10.12.0 and MapboxCommon to 23.4.0
- Correct user-agent fragment sent to events/telemetry service.
- Bump MapboxCoreMaps to 10.12.0-rc.1 and MapboxCommon to 23.4.0-rc.1.
- Change annotation end-of-drag delay to 0.125 to minimize lagging.
- Different data types are now used for
querySourceFeaturesandqueryRenderedFeatures:QueriedSourceFeatureandQueriedRenderedFeature.QueriedRenderedFeaturehas a new fieldlayerwhich contains the queried feature's layer id. - Remove deprecated
queryRenderedFeatures()methods. UsequeryRenderedFeatures(with:options:completion:)instead. - Remove deprecated
queryFeatureExtension()method. UsegetGeoJsonClusterLeaves()/getGeoJsonClusterChildren()/getGeoJsonClusterExpansionZoom()instead. - Add the
MapboxMap.resetFeatureStatemethod. - Add
callbackargument to theMapboxMapmethodsgetFeatureState,setFeatureState,removeFeatureState. - Return
cancelablefrom theMapboxMapmethods :getFeatureState,setFeatureState,removeFeatureState,querySourceFeatures,getGeoJsonClusterLeaves,getGeoJsonClusterChildren,getGeoJsonClusterExpansionZoom. - The
CameraOptions/paddingfield is now optional.
- Added basic signposts for performance profiling. To enable them, use
MAPBOX_MAPS_SIGNPOSTS_ENABLEDenvironment variable. (#1818) - Fix build erros appearing when SDK distributed as a static library through Cocoapods. (#1888)
- Update MapboxCoreMaps to
v10.12.0-beta.1and MapboxCommon tov23.4.0-beta.1 - Fix app extension support. (#1916)
- Allow pass
dataIdtosourceDataLoadedevent. - Add a dedicated GestureRecognizer (and Handler) to interrupt deceleration animation on tap on the map.
- Update to MapboxCoreMaps 10.11.1 and MapboxCommon 23.3.1. (#1899)
- Improve stability of attribution parsing. (#1849)
- Enable
Expressionto be created without an operator soclusterPropertiescan support advanced use cases. (#1855) - Update CoreMaps
10.11.0-rc.1and CommonSDK23.3.0-rc.1. (#1856) - Angle normalization function was improved to prevent map spinning on close angles. (#1828)
- Reduce CPU usage/energy consumption whem map idling while showing user location. (#1789)
- Fix loading errors appearing when providing custom endpoint for
ResourceOptions.baseURL. (#1749) - Remove delegate requirement for annotation interaction. (#1750)
- Reset compass image to default one if
nilwas passed to theMapboxCompassOrnamentView.updateImage(image:). (#1766, #1772) - Prevent
PointAnnotationManagerto remove images that are not owned by it from Style. (#1775) - Use
sdfparameter when adding a style image. (#1803) - Fix scale bar grows beyond its maximum width at large zoom near north/south poles. (#1802)
- Improve GeoJSONSource add/update performance by passing
GeoJSONSourceDatadirectly. (#1815) - Support
ExpressioninFormatOptions. (#1826) - Update to MapboxCoreMaps 10.11.0-beta.1 and MapboxCommon 23.3.0-beta.1. (#1842)
- [CarPlay] Fix map view permanently pausing when moving to window on foreground (#1808)
- Update CoreMaps and CommonSDK. (#1777)
- Fix memory leak when viewport is being deallocated while transition is running. (#1691)
- Fix issue with simultaneous recognition of tap gesture. (#1712)
- Fix label localization to properly handle Simplified and Traditional Chinese. (#1687)
- Allow simultaneous recognition of map- and annotation- handling gesture recognizers. (#1737)
- Update MapboxCommon to
v23.2.0-rc.3. (#1738)
- Animates to camera that fit a list of view annotations. (#1634)
- Prevent view annotation being shown erroneously after options update.(#1627)
- Add an example animating a view annotation along a route line. (#1639)
- Enable clustering of point annotations, add example of feature. (#1475)
- Reduce location provider heading orientation update frequency. (#1618)
- Expose the list of added view annotations. (#1621)
- Fix
loadStyleURI/loadStyleJSONcompletion being invoked more than once. (#1665) - Remove ornament position deprecation. (#1676)
- Prevent map from being rendered on background. By aligning better with Scene lifecycle API, as well as, respecting scene/application activation status, rendering artifacts should no longer be an issue after app is coming from background. (#1675)
- Support
isDraggableandisSelectedproperties for annotations. (#1659) - New API to load custom style JSON on the initilization of MapView. (#1686)
- Update MapboxCoreMaps to
v10.10.0-beta.1and MapboxCommon tov23.2.0-beta.1. (#1680) - Add API to enable/disable render of world copies. (#1684)
- Avoid triggering assertion for the 3D puck layer when returning
allLayerIdentifiers. (#1650)
- Update to MapboxCoreMaps 10.9.0 and MapboxCommon 23.1.0. (#1652)
- Fix accuracy ring radius jumping when zooming the map in/out with
.reducedAccuracylocation authorization.(#1625) - Fix behavior with initial view annotation placement.(#1604)
- Fix behavior where selected view annotation is not moved to correct z-order.(#1607)
- Update MapboxCoreMaps to
v10.9.0-rc.1. (#1630) - Update MapboxCommon to
v21.1.0-rc.2. (#1630)
- Replace MapboxMobileEvents dependency with CoreTelemetry (part of MapboxCommon). (#1379)
- Expose
ResourceRequestproperties publicly. (#1548) - Parse GeoJSON data on a background queue. (#1576)
- Fix block retain cycle in
MapboxMap/observeStyleLoad(_:), from now onloadStyleURIandloadStyleJSONcompletion block will not be invoked when MapboxMap is deallocated. (#1575) - Remove
DictionaryEncoderenforce nil encoding for nested level of the dictionary. (#1565) - Expose
distance-from-centerandpitchexpressions. (#1559) - Expose location puck opacity. (#1585)
- Update MapboxCoreMaps to v10.9.0-beta.1 and MapboxCommon to v23.1.0-beta.1. (#1589)
- Apply mercator scale to 3D puck also when its
modelScaleis not specified. (#1523)
- Expose image property for compass ornament. (#1468)
- Expand scale bar range up to 15000 km/10000 miles. (#1455)
- Add the ability to override scale bar units. (#1473)
- Animate padding changes between 2 camera when used with
FlyToCameraAnimator. (#1479) - Fix NaN latitude crash rarely happening in
CameraAnimationsManager.fly(to:duration:completion). (#1485) - Fix
Style.updateLayer(withId:type:update)so resetting a layer's properties should work. (#1476) - Add the ability to display heading calibration alert. (#1509)
- Add support for sonar-like pulsing animation around 2D puck. (#1513)
- Support view annotation lookup by an identifier. (#1512)
- Update to MapboxCoreMaps 10.7.0 and MapboxCommon 22.1.0. (#1492)
- Limit
MapboxMap.points(for:)to the bounds of the map view, if the coordinate's point is beyond then return (-1, -1) for its corresponding point.(#1490) - Remove experimental ModelLayer API. (#1486)
- Add rotation threshold to prevent map from being rotated accidentally. (#1429)
- Introduce
GestureOptions.simultaneousRotateAndPinchZoomEnabledand deprecateGestureOptions.pinchRotateEnabledin favor ofGestureOptions.rotateEnabled. (1429) - Expose public initializer for
TilesetDescriptorOptionsForTilesets. (#1431) - Fix view annotation losing its feature association after update. (#1446)
- Update CoreMaps to
10.7.0-rc.1. (#1456)
- Introduce
FillExtrusionLayer.fillExtrusionAmbientOcclusionIntensityandFillExtrusionLayer.fillExtrusionAmbientOcclusionRadiusproperties for FillExtrusionLayer. (1410) - Introduce
PointAnnotation.textLineHeightand deprecatedPointAnnotationManager.textLineHeight, astext-line-heightis data-driven property now. (1410) - Remove experimental annotation from Viewport API. (#1392)
- Remove deprecated
animationDurationparameter inFollowPuckViewportStateOptionsinitializer.(#1390) - Deprecate existing QueryRenderedFeatures methods and add cancellable counterparts. (#1378)
- Add well-formed(type-safe) map event types. (#1362)
- Use MapboxCoreMaps API to move a Layer instead of manually removing the layer then adding it back. (#1367)
- Expose API to get puck's location updates. (#1365)
- Add example for simulating a route with vanishing effects. (#1328)
- Expose transition properties for Atmosphere API. (#1401)
- Fix Atmosphere API coding keys so engine can read the new values properly. (#1401)
- Pause metal rendering earlier in app/scene life-cycle to address rendering artifacts when coming from background. (#1402)
- Update to MapboxCoreMaps 10.7.0-beta.1 and MapboxCommon to 22.1.0-beta.1. (#1415)
- Update to MapboxCoreMaps 10.6.0 and MapboxCommon to 22.0.0. (#1394)
- Update to MapboxCoreMaps 10.6.0-rc.1 and MapboxCommon 22.0.0-rc.2. (#1368)
- Add mercator scale factor to 3D puck, so that the 3D puck size won't increase as latitude increases. (#1347)
- Introduce ModelLayer experimental API to render 3D models on the map. (#1348)
- Expose API to check whether an image exists in
Style. (#1297) - Call
MapboxMap.reduceMemoryUsewhen application goes to background. (#1301) - Update to MapboxMobileEvents v1.0.8. (#1324)
- Enable explicit drawing behavior for metal view(call
draw()explicitly instead ofsetNeedsDisplaywhen view's content need to be redrawn) again.(#1331) - Update to MapboxCoreMaps 10.6.0-beta.3 and MapboxCommon 22.0.0-beta.1. (#1335, #1342)
- Add Atmosphere API (#1329)
- Update SDK name in attribution action sheet. (#1338)
- Revert tap target to original value. (#1339)
- Update to MapboxCoreMaps 10.5.1 and MapboxCommon 21.3.0. (#1310, #1313)
- Invoke animator completion handlers added after completion or cancellation. (#1305)
- Add support for runtime source properties. (#1267)
- Start location services lazily. (#1262)
- Fix localization crash on iOS 11 and 12. (#1278)
- Increase tap target to conform to Apple Human Interface guidelines. (#1283)
- Update to MapboxCoreMaps 10.5.0-rc.1 and MapboxCommon 21.3.0-rc.2. (#1281)
- Expose API to set memory budget for
MapboxMap. (#1288)
- Mitigate
OfflineRegionManager.mergeOfflineDatabase(for:completion)throwingTypeConversionError.unexpectedTypeon a successfull merge. IntroduceOfflineRegionManager.mergeOfflineDatabase(forPath:completion)as the correct way to merge offline database. (#1192) - Limit MapboxMap.point(for: CLLocationCoordinate2D) to the bounds of map view (#1195)
- Add support for app extensions. (#1183)
BasicCameraAnimator.cancel()and.stopAnimation()now invoke the completion blocks withUIViewAnimatingPosition.currentinstead of crashing with afatalErrorwhen invoked prior to.startAnimation()or.startAnimation(afterDelay:). (#1197)CameraAnimationsManager.stopAnimations()will now cancel all animators regardless of their state. Previously, only animators withstate == .activewere canceled. (#1197)- Fix animator-related leaks. (#1200)
- Improve AnyTouchGestureRecognizer's interaction with other gesture recognizers. (#1210)
- Expose convenience properties and methods to transform
CoordinateBounds. (1226) - Update annotation examples. (#1215)
- Add
Style.setLight(_:)to set light onto a style. UpdateBuildingExtrusionsExamplewith an example to set a light source on the style. (#1234) - Remove
FollowPuckViewportStateOptions.animationDuration, a workaround for the moving target problem. (#1228) - Deprecate
FollowPuckViewportStateOptions.animationDuration, a workaround for the moving target problem. (#1228) - Add map view example with
debugOptions. (#1225) - Introduce
line-trim-offsetproperty for LineLayer. (#1231) - Add
MapboxMap.coordinateBoundsUnwrapped. (#1241) - Update
DefaultViewportTransitionto solve the moving target problem. (#1245) - Increase deceleration cutoff threshold from 20 to 35 to prevent camera changes after animation stops. (#1244)
- Update to MapboxCoreMaps 10.5.0-beta.1 and MapboxCommon 21.3.0-beta.2. (#1235)
- API for using globe projection has been moved to
Style.setProjection(_:)andStyle.projectionand is no longer experimental. (#1235) - Add
OfflineRegion.getStatus(completion:). (#1239) - Add a prefix
maps-iosto all Log message's category. (#1250))
- Revert to using metal view draw notifications (
setNeedsDisplay()instead ofdraw()). (#1216)
- Update to MapboxCoreMaps 10.4.1 and MapboxCommon 21.2.0. (#1190)
- Update to MapboxCoreMaps 10.4.0-rc.1 and MapboxCommon 21.2.0-rc.1. (#1158)
- Enable explicit drawing behavior for metal view(call
draw()explicitly instead ofsetNeedsDisplaywhen view's content need to be redrawn).(#1157) - Restore cancellation of animations on single tap. (#1166)
- Fix issue where invalid locations could be emitted when setting a custom location provider. (#1172)
- Fix crash in Puck2D when location accuracy authorization is reduced. (#1173)
- Fix an issue where plain text source attribution was not populated in attribution dialog.(1163)
BasicCameraAnimator.owneris now public. (#1181)- The animation owner for ease-to and fly-to animations is now
"com.mapbox.maps.cameraAnimationsManager". (#1181)
- Prevent rendering in background by pausing/resuming display link in response to application or scene lifecycle events. (#1086)
- Sync viewport and puck animations. (#1090)
- Add puckBearingEnabled property for location. (#1107)
- Fix camera change events being fired after map has stopped moving. (#1118)
- Fix issue where single tap and double tap to zoom in gestures could recognize simultaneously. (#1113)
- Remove experimental GestureOptions.pinchBehavior property. (#1125)
- Update to MapboxCoreMaps 10.4.0-beta.1 and MapboxCommon 21.2.0-beta.1. (#1126)
- Exposed APIs to allow positioning of other views relative to the logoView, compassView, scaleBarView and attributionButton. (#1130)
- Add
GestureOptions.pinchPanEnabledand.pinchZoomEnabled. (#1092) - Fix an issue where pinch gesture emitted superfluous camera changed events. (#1137)
- Add focalPoint property to zoom and rotate gestures (#1122)
- Expose public initializers for
LayerInfoandSourceInfo. (#1144) - Add
ViewAnnotationManager.removeAll()that removes all view annotations added before. IntroduceViewAnnotationUpdateObserverprotocol for notifying when annotion views get their frames or visibility changed. AddViewAnnotationManager.addViewAnnotationUpdateObserver(_:)andViewAnnotationManager.removeViewAnnotationUpdateObserver(_:)to add and remove observers. (#1136)
- Updated to MapboxCoreMaps 10.3.2 and MapboxCommon 21.1.0. (#1078, #1091, #1104)
- Fixed compass button regression introduced in rc.1. (#1083)
- Removed pitch gesture change angle requirements to avoid map freezing during gesture. (#1089)
- Exposed API to invalidate
OfflineRegion. (#1026) - Exposed API to set metadata for
OfflineRegion. (#1060) - Refined Viewport API. (#1040, #1050, #1058)
- Add extension function to show or hide bearing image. (#980)
- Updated to MapboxCoreMaps 10.3.0-rc.1 and MapboxCommon 21.1.0-rc.1. (#1051)
- Add APIs to enable customizing 2D puck accuracy ring color. (#1057)
- Exposed
triggerRepaint()to allow manual map repainting. (#964) - Exposed
TransitionOptionsto allow control over symbol fade duration. (#902) - Added
Style.removeTerrain()to allow removing terrain. (#918) Snapshotterinitialization now triggers a turnstyle event. (#908)- Fixed a bug where 2D puck location was never set when location accuracy authorization was reduced. (#989)
- Fixed a bug where setting LocationManager.options would cause the LocationProvider to be reconfigured. (#992)
- Update to MapboxCoreMaps 10.2.0 and MapboxCommon 21.0.1. (#952)
- Fix the crash when MapView had zero width or height. (#903)
- Removed experimental designation from persistent layer APIs. (#849)
- Fixed an issue that prevented direct download artifacts from exposing experimental APIs. (#854)
- Updates
Style.localizeLabels(into:forLayerIds:)to only localize the primary localization and not the fall-through localizations. (#856) - Removes swiftlint config from direct download artifacts. (#859)
- Removed
AnnotationViewwrapper views fromViewAnnotationManagerAPI. (#846) - Reduce geometry wrapping using GeometryConvertible. (#861)
- Fixed an issue that could prevent the location puck from appearing. (#862)
- Added support for exponentials to
StyleColor. (#873) - Fixes initialization of attribution dialog. (#865)
- Improved panning behavior on pitched maps. (#888)
- Added pinch gesture tradeoff configuration option. (#890)
- Update to MapboxCoreMaps 10.2.0-rc.1 and MapboxCommon 21.0.0-rc.2. (#891)
- Fixed an issue where camera animations triggered with
startAnimation(afterDelay:)could appear jerky after a pan gesture. (#789) - Send location update when puck is nil and other location-related improvements. (#765)
- Update to MapboxCoreMaps 10.2.0-beta.1 and MapboxCommon 21.0.0-rc.1. (#836)
- Updates pan and pinch gesture handling to work iteratively rather than based on initial state. (#837)
AnnotationOrchestrator, rather than the annotation managers, now manages the single-tap gesture recognizer for annotations. (#840)- Add view annotations feature, which enables the usage of custom UIView subclasses as annotations. (#776)
- Fixed billing issue when upgrading Mapbox Maps SDK from v6 to v10. (#943)
NOTE: As of December 3, 2021, this release is no longer available due to a new bug that was introduced while fixing the billing issue. A new patch will be issued shortly.
- Fixed billing issue when upgrading Mapbox Maps SDK from v6 to v10. (#885)
- Update to
MapboxCoreMapsv10.1.0 andMapboxCommonv20.1.0. (#807)
- Fixed an issue with
UIImageconversion that led to a "mismatched image size" error. (#790) - Update to
MapboxCoreMapsv10.1.0-rc andMapboxCommonv20.1.0-rc.2. (#790)
- Make
PointAnnotation.Image's fields public. (#753) - Set
MapboxMapflags 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.pinchRotateEnabledto 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
queryFeatureExtensionto fail. (#769) - Updated
MapboxCoreMapsto v10.1.0-beta andMapboxCommonto 20.1.0-rc.1. (#769)
- Fixed billing issue when upgrading Mapbox Maps SDK from v6 to v10. (#942)
NOTE: As of December 3, 2021, this release is no longer available due to a new bug that was introduced while fixing the billing issue. A new patch will be issued shortly.
- Fixed billing issue when upgrading Mapbox Maps SDK from v6 to v10. (#876)
- 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
addImagefunction. (#695) public func layer<T: Layer>(withId id: String) throws -> Thas 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) throwshas 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 -> Thas 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 -> Layeris 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 -> Sourceis 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.Imagefrom anenumto astruct. (#707) - Removes
PointAnnotation.Image.default. (#707) - Replaces
PointAnnotation.Image.customwithPointAnnotation.Image.init(image:name:). (#707) - The
tapGestureRecognizervar on each*AnnotationManagerhas been removed in favor of a unified tap gesture recognizer available atGestureManager.singleTapGestureRecognizer(#709). public func layerProperty(for layerId: String, property: String) -> Anyhas been renamed topublic func layerPropertyValue(for layerId: String, property: String) -> Anyto avoid ambiguity. (#708)MapboxCommon.Geometryextension methods are now marked as internal. (#683)TileRegionLoadOptionsinit now takes aGeometryinstead of aMapboxCommon.Geometry. (#711)CameraAnimationsManager.optionshas been removed. UseMapboxMap.cameraBoundsandMapboxMap.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
dataproperty 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.mapLoadingErrorevent 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.geometryto useGeometryrather 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
AnnotationManagerprotocol now conforms toAnyObject. (#725) PreferredFPShas been removed.MapView.preferredFramesPerSecondnow of typeInt, rather thanPreferredFPS. (#735)QueriedFeature.featureis no longer optional. (#737)TypeConversionErrorhas a new caseunsuccessfulConversion. (#737)
TileRegionLoadOptionsexposes 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
Featurenow allowFeature.identifierand.propertiesto benil. (#717) - APIs that accept Turf
Featurenow ignoreFeature.propertiesinstead 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
MapViewto disable this behavior as needed. (#712) BasicCameraAnimatorno longer updates the camera a final time after being stopped or canceled prior to running to completion. (#712)BasicCameraAnimator.isReversedis 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.annotationManagersByIdhas 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.GeoJSONObjectinstance in an expression with theExpression.Operator.distanceorExpression.Operator.withinoperator. (#730) - Adds
MapView.preferredFrameRateRangefor 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-providedTileStoreObservercan be wrapped into aMapboxCommon_Private.TileStoreObserverwithout 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
TileStoreObserverprotocol. (#737)
- Fix rendering artifacts for a model layer when
model-opacityproperty 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)
BasicCameraAnimatornow 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.filteris now of typeExpressioninstead ofAny(#689)OfflineRegionGeometryDefinition.geometryis now of typeTurf.Geometryinstead ofMapboxCommon.Geometry(#689)- The
HTTPResponseinit methods that takeMapboxCommon.Expectedinstead ofResultare now correctly marked as refined for Swift. (#689) - The
DownloadStatusinit methods that takeMapboxCommon.Expectedinstead ofResultandNSNumber?instead ofUInt64?are not correctly marked as refined for Swift. (#689) GestureOptions.hapticFeedbackEnabledhas been removed. (#663)GestureManager.decelarationRatehas been removed andGestureOptions.decelerationRateis the single source of truth. (#662)GestureManagerno longer conforms toNSObjectand is not aUIGestureRecognizerDelegate. (#669)TapGestureHandler.initwas previously public by mistake and is now internal. (#677)- The behavior of
GestureManager.optionshas been updated to better reflect theisEnabledstate of the associated gesture recognizers. (#677) - The gesture recognizer properties of
GestureManagerare no longerOptional. (#677) GestureTypehas been redesigned so that its cases have a 1-1 relationship with the built-in gestures. (#677)GestureManager.rotationGestureRecognizerhas been removed. Rotation is now handled by.pinchGestureRecognizerin addition to its preexisting handling of panning and zooming. (#696)GestureManager.doubleTapToZoomOutGestureRecognizerhas been replaced with.doubleTouchToZoomOutGestureRecognizer. (#696)PanScrollingModehas been renamed toPanMode. (#696)GestureOptions.zoomEnabledhas been replaced by.doubleTapToZoomInEnabled,.doubleTouchToZoomOutEnabled, and.quickZoomEnabled. (#696)GestureOptions.rotateEnabledhas been removed. (#696)GestureOptions.scrollEnabledhas been renamed to.panEnabled. (#696)GestureOptions.scrollingModehas been renamed to.panMode. (#696)GestureOptions.decelerationRatehas been renamed to.panDecelerationFactor. (#696)GestureType.doubleTapToZoomOuthas been replaced with.doubleTouchToZoomOut. (#696)GestureType.rotatehas been removed. (#696)GestureTypecases have been reordered for consistency withGestureOptionsandGestureManager. (#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 nowvars instead oflets for testing purposes, and a public, memberwise initializer has been added. (#677)PanScrollingModenow conforms toCaseIterable. (#677)GestureTypenow 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
UIImageout 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#getStyleLayerPropertyDefaultValuefor '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.featureis 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
setInterceptorthat must be implemented (#628) Geometrynow refers toTurf.Geometryinstead ofMapboxCommon.Geometry. (#622)Featurenow refers toTurf.Featureinstead ofMapboxCommon.Feature. (#642)- Renamed
ColorRepresentabletoStyleColor(#650) - Removed the argument label from
StyleColor'sUIColorinitializer (#650) - Renamed
ColorRepresentable.rgbaDescriptiontoStyleColor.rgbaString. (#650) - Changed
StyleColor'sEncodableimplementation to always encode an rgba color string instead of encoding an rgba expression (#650) - Updated the extension on
UIColorthat addsExpressionArgumentConvertibleto 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
layerTypeargument toStyle._layerPropertyDefaultValue(for:property:)is now of typeLayerTypeinstead ofString(#650) Expressiondecoding will now fail if the operator is missing (#650)PointAnnotationManager.textVariableAnchoris now of type[TextAnchor]?instead of[String]?(#650)PointAnnotationManager.textWritingModeis 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'sDecodablesupport 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
showAccuracyRingproperty inPuck2DConfigurationtotrue. #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
AnnotationMnageris now removed correctly when anAnnotationManageris deallocated (#633) - Updated annotations to use
rgbaStringandinit(rgbaString:)when serializing and deserializingStyleColors (#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-fieldandline-gradientfor 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
FeatureStatein GeoJSON sources. (#611)setFeatureState(sourceId:sourceLayerId:featureId:state:)is used to associate astateMapfor a particular featuregetFeatureState(sourceId:sourceLayerId:featureId:callback:)is used to retrieve a previously storedstateMapfor a featureremoveFeatureState(sourceId:sourceLayerId:featureId:stateKey:)is used to remove a previously storedstateMapfor 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/setinstead ofdidSet. This fixes an issue where properties were not being set atinit. (#590) GeoJSONSource.clusterPropertiesis 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
MapViewpositioning wasn't correct when used in containers such as UIStackView. (#533)
- Added new options to
MapSnapshotOptionsshowsLogois a flag that will decide whether the logo will be shown on a snapshotshowsAttributionis a flag that will decide whether the attribution will be shown on a snapshot
- Support
text-writing-modeproperty 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)
TileRegionErrorhas a new casetileCountExceeded(String). (#522)- FlyToCameraAnimator.state will now be
.inactiveafter it completes or is stopped. This change makes its behavior consistent with the behavior ofBasicCameraAnimator. (#519) - Completion blocks added to
BasicCameraAnimatorwill no longer be invoked as a side-effect of deinitialization. (#519) - Removed the
SupportedLanguageenum. You may now useLocale(identifier: String)as intended. (#512) - Removed the
MapView.localeproperty. 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-centeranchor 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) MapLoadingErrorevents 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 theSupportedLanguagesenum, which lists currently supportedLocale. (#480) -
Fixed Tileset descriptor bug: Completion handler is called even if the
OfflineManagerinstance 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
MapSnapshotOptionsto a struct. (#430) - Removed
CacheManager. In the following releases, an API to control temporary map data may be provided. (#440) - Changed
ResourceOptions.cachePathURLtodataPathURLand removedcacheSize. (#440) - Annotations don't have a
typeproperty 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
headingorcoursevia a newpuckBearingSourceoption 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-offsetproperty was used. (#440) - Emit
.mapLoadingErrorwhen 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
.mapLoadingErrorwhen an empty URL is set to GeoJSON source. (#440)
- Updated MapboxCoreMaps, MapboxCommon and Turf dependencies. (#440)
- 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)
- 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)
- 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(...) -> 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. (#) - 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)
- Fixed an issue where the map's scale bar and compass view could trigger
layoutSubviews()for the map view. (#338)
OrnamentOptions.logo._isVisibleandOrnamentOptions.attributionButton._isVisiblehave been replaced withOrnamentOptions.logo.visibilityandOrnamentOptions.attributionButton.visibility. (#326)
- Fixed an issue where location pucks would not be rendered. (#331)
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
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)
-
- 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
- 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). 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
-
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)
-
- 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).
- 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.
- Fixed a crash in line layer rendering, where the uniform buffer size had an incorrect value.
-
AnnotationManagerno longer conforms toObserverand no longer has apeer(#246) -
AnnotationSupportableMapis now internal (#246) -
- 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
-
LayoutPositionhas been deprecated in favor ofOrnamentPosition.LayoutVisibilityhas been deprecated 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.
-
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.
-
- Initializer is now marked as internal.
styleUriproperty has been renamed touri.- The
urlproperty fromStyleURLhas been removed.
-
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
- 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.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. UseLocationOptions.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.
- 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.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)
- 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:
mapResumedRenderingmapPausedRenderingmapLoadingStartedrenderMapStartedrenderMapFinishedcameraWillChangecameraIsChanging
- Events that have been renamed:
EventType.Map.mapLoaded->EventType.Map.loadedMapEvents.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
presentsWithTransactionproperty 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.