Releases: mapbox/mapbox-maps-ios
Releases · mapbox/mapbox-maps-ios
v11.2.0
Features ✨ and improvements 🏁
- visionOS support. Check out our Work with visionOS article to get started! 🚀 35a3bea by @persidskiy
- Add easing curve parameter to
CameraAnimationsManager.fly(to:duration:curve:completion)
, makeTimingCurve
public with few more options. fb71405 by @aleksproger - Expose
MapboxMap.centerAltitudeMode
and ensure correctcenterAltitudeMode
on gesture ending. d83e2e3 by @aleksproger - Expose extra configuration methods for
MapboxMap
:setNorthOrientation(_:)
,setConstrainMode(_:)
andsetViewportMode(_:)
.
Use them to configure respective map options after creating a map view. d83148d by @evil159 - Expose
MapboxMap.reduceMemoryUse()
which can be used in situations when it is important to keep the memory footprint minimal. d83148d by @evil159 - Expose
MapboxMap.isAnimationInProgress
andMapboxMap.isGestureInProgress
to query current status of both built-in and custom camera animations and gestures. d83148d by @evil159 - Expose experimental
CustomRasterSource
and non-experimentalCustomGeometrySource
as regularSource
's providing a better way to work with them and also allow for using them in Style DSL. 711ac7f by @pjleonard37 - Introduce
tileCacheBudget
property onGeoJsonSource
,RasterSource
,RasterDemSource
,RasterArraySource
,VectorSource
,CustomGeometrySource
, andCustomRasterSource
. 942afd6 by @pjleonard37 MapboxMaps/setTileCacheBudget(size:)
will now use theTileCacheBudgetSize
property, the older method withTileCacheBudget
has been deprecated and will be removed in a future major release. 942afd6 by @pjleonard37- Introduce
SymbolLayer.iconColorSaturation
API. ed4a831 by @aleksproger - Introduce experimental
RasterLayer.rasterElevation
API. ed4a831 by @aleksproger - Introduce experimental
MapboxMap.collectPerformanceStatistics
allowing to collect map rendering performance statistics, both for UIKit and SwiftUI. 1a5fd6f by @aleksproger
Bug fixes 🐞
- Fix MapView flickering during resizing. 8824c0c by @OdNairy
- Fix glitch in chained camera animations. 8824c0c by @OdNairy
- Build XCFramework with
SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO
flag to avoid serialized search paths in Swift modules. 84b7724 by @OdNairy - Fixed a crash that occurs when annotations have duplicate identifiers. 1b7dfcc by @persidskiy
- Fix Map and encompassing List scroll at the same time. 4367c15 by @aleksproger
Dependencies
Dependency requirements:
- Compatible version of Xcode:
14.3.1
v10.16.5
Bug fixes 🐞
- Address crashes on certain devices by disabling the texture pool
- Fix snapshotter race conditions to ensure new request could effectively trigger map rendering
Dependencies
Dependency requirements:
- Compatible version of Xcode: 14.1.0
v11.2.0-rc.1
Features ✨ and improvements 🏁
- model-emissive-strength support for landmarks
- Little speedup of preparing tiled sources for rendering
- Uploading model resources to GPU in continuous map mode is now limited by fixed time per frame
- Modified fill-extrusion-cutoff-fade-range to scale down and remove buildings in a staggered fashion, instead of fading opacity
Bug fixes 🐞
- Fix Map and encompassing List scroll at the same time by @aleksproger
- visionOS small enhancements by @persidskiy @azarovalex
- Fix model-cutoff-fade-range calculation on low zoom levels
- Fixed rare null pointer dereference crash
- Fix crash in device location provider
- Fix cache invalidation region coordinates parsing: accept integers.
Dependencies
- Update MapboxCoreMaps to
11.2.0-rc.1
- Update MapboxCommon to
24.2.0-rc.2
Dependency requirements:
- Compatible version of Xcode:
14.3.1
v11.2.0-beta.1
Features ✨ and improvements 🏁
- visionOS support. Check out our Work with visionOS article to get started! 🚀 35a3bea by @persidskiy
- Add easing curve parameter to
CameraAnimationsManager.fly(to:duration:curve:completion)
, makeTimingCurve
public with few more options. fb71405 by @aleksproger - Expose
MapboxMap.centerAltitudeMode
and ensure correctcenterAltitudeMode
on gesture ending. d83e2e3 by @aleksproger - Expose extra configuration methods for
MapboxMap
:setNorthOrientation(_:)
,setConstrainMode(_:)
andsetViewportMode(_:)
.
Use them to configure respective map options after creating a map view. d83148d by @evil159 - Expose
MapboxMap.reduceMemoryUse()
which can be used in situations when it is important to keep the memory footprint minimal. d83148d by @evil159 - Expose
MapboxMap.isAnimationInProgress
andMapboxMap.isGestureInProgress
to query current status of both built-in and custom camera animations and gestures. d83148d by @evil159 - Expose experimental
CustomRasterSource
and non-experimentalCustomGeometrySource
as regularSource
's providing a better way to work with them and also allow for using them in Style DSL. 711ac7f by @pjleonard37 - Introduce
tileCacheBudget
property onGeoJsonSource
,RasterSource
,RasterDemSource
,RasterArraySource
,VectorSource
,CustomGeometrySource
, andCustomRasterSource
. 942afd6 by @pjleonard37 MapboxMaps/setTileCacheBudget(size:)
will now use theTileCacheBudgetSize
property, the older method withTileCacheBudget
has been deprecated and will be removed in a future major release. 942afd6 by @pjleonard37- Introduce
SymbolLayer.iconColorSaturation
API. ed4a831 by @aleksproger - Introduce experimental
RasterLayer.rasterElevation
API. ed4a831 by @aleksproger - Introduce experimental
MapboxMap.collectPerformanceStatistics
allowing to collect map rendering performance statistics, both for UIKit and SwiftUI. 1a5fd6f by @aleksproger
Bug fixes 🐞
- Fix MapView flickering during resizing. 8824c0c by @OdNairy
- Fix glitch in chained camera animations. 8824c0c by @OdNairy
- Build XCFramework with
SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO
flag to avoid serialized search paths in Swift modules. 84b7724 by @OdNairy - Fixed a crash that occurs when annotations have duplicate identifiers. 1b7dfcc by @persidskiy
Dependencies
- Update MapboxCoreMaps to
11.2.0-beta.1
- Update MapboxCommon to
24.2.0-beta.1
. - Bump Turf version to
2.8.0
. - Bump minimum Xcode version to
14.3.1
.
Dependency requirements:
- Compatible version of Xcode:
14.3.1
Maps SDK v11.1.0
Features ✨ and improvements 🏁
- Add
customData
field in Annotaion and deprecateuserInfo
.userInfo
behaviour rolled back to v10 behaviour. 6e0c736 by @aleksproger - Make padding optional in
MapboxMap.camera(for:padding:bearing:pitch:maxZoom:offset:)
andMapboxMap.camera(for:padding:bearing:pitch:)
. 06d6602 by @evil159 - Expose method to get coordinate info for point(s):
MapboxMap.coordinateInfo(for:)
andMapboxMap.coordinatesInfo(for:)
. 58aa4f2 by @evil159 - [SwiftUI] Expose
Map.gestureHandlers()
for handling Map gesture events. 741fa51 by @persidskiy - Introduce experimental
RasterArraySource
, along withRasterLayer.rasterArrayBand
. 920fcac by @evil159 - Introduce
-emissiveStrength
attribute forFillExtrusionLayer
,HillShadeLayer
andRasterLayer
. 920fcac by @evil159
Bug fixes 🐞
- Fix the bug where the annotation could disappear when it is dragged. 3ab355f by @persidskiy
- Fixed a bug where the attribution dialog does not appear when there is a presented view controller. 9e09f50 by @persidskiy
Dependencies
Dependency requirements:
- Compatible version of Xcode:
14.1.0
v10.16.4
Changes
Features ✨ and improvements 🏁
- Update MapboxCoreMaps to 10.16.4 and MapboxCommon to 23.8.6
- [TileStore] Improve stability.
Bug Fixes 🐞
- Fix tile flickering when terrain is enabled.
- Fix a race condition on repeated style transitions where the transition fails for some layers.
- Fix incorrect camera positions while using setBounds.
- Reload image-dependent tiles when sprites are loaded.
- Exclude duplicated tileID in tileCover query results.
- Fix artifacts at style transition by using a more robust approach for updating data-driven properties.
- [TileStore] Initialize config service when global access token is set with TileStore.setOptionForKey
Dependencies
- Update MapboxCommon to
23.8.6
. - Update MapboxCoreMaps to
10.16.4
:
Dependency requirements:
- Compatible version of Xcode:
14.1.0
v11.1.0-rc.1
Maps SDK (11.1.0-rc.1
)
Bug fixes 🐞
- Fix the bug where the annotation could disappear when it is dragged.
MapboxCoreMaps (11.1.0-rc.1
)
Bug fixes 🐞
- Fixed wrong camera positions while using setBounds
- Fixes missing IDs of flat light types when configured through the setLights API
- Reload image-dependent tiles on when sprites are loaded
- Fix an issue where memory use would grow continuously with Z-offset enabled symbol layers
- Fix crash when using Dynamic View Annotation with location indicator enabled but visibility is turned from visible to none
- Fix getStyleSourceProperties() API for RasterArray source
- Fix unreliable position update of View Annotations
- Fix invalid GL_INVALID_ENUM error when default FBO gets discarded
MapboxCommon (24.1.0-rc.1
)
Features ✨ and improvements 🏁
- [tile_store] Disable In-memory download by default
- [tile_store] Cancel in-memory download that contains only requests with SkipDataLoading flag
- [billing] Add Nav v3 SKU Identifiers
Bug fixes 🐞
- [tile_store] Do not count non-serveable invalidated resources as completedResource when getting group
Dependency requirements:
- Compatible version of Xcode:
14.1.0
v11.1.0-beta.1
Known Issues ⚠️
RasterArraySource.rasterLayers
is alwaysnil
for any source.
Workaround: useMapboxMap.sourceProperty(for:property:).value
to fetch a value ofRasterArraySource.rasterLayers
.
Features ✨ and improvements 🏁
- 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
-emissiveStrength
attribute forFillExtrusionLayer
,HillShadeLayer
andRasterLayer
.
Bug fixes 🐞
- Fix inconsistent behavior in fill-extrusion color when using directional and ambient lights.
- Downloaded but corrupted style is now invalidated and will be downloaded again on the next load.
- Fixed missing tiles in the bottom part of the screen when looking from the mountain down to the valley.
- Do not emit slot missing warnings if style imports are not fully loaded.
- Fixed wrong dem tile selection from elevation snapshots in rare cases.
- Fixed tile flickering with enabled terrain.
- Add missing properties, i.e.
array
,values
,maxValue
,minValue
,stepValue
,metadata
for queried import schemas, if they are present in the original schema. - Exclude duplicated tileID in tileCover querying results.
- Fix race condition on repeated style transitions, when the transition fails for some layers.
- Force texture recreation in case the texture is not replaceable.
- Check for ETC texture format availability in Mac Catalyst.
- Allow style schema to control imported fragment configs.
Dependencies
- Update MapboxCommon to
24.1.0-beta.2
. - Update MapboxCoreMaps to
11.1.0-beta.1
.
Dependency requirements:
- Compatible version of Xcode:
14.1.0
v10.16.3
Changes
- Update MapboxCoreMaps to
10.16.3
- Update MapboxCommon to
23.8.5
MapboxCoreMaps v10.16.3
Bug fixes 🐞
- Fix crash with enabled timestamps debug option
- Fix crash caused by model_collision shader compilation failure
- Fix assertion hit at TransformState::requiresLOD()
- Added processing of unknown exceptions (without RTTI some standard exceptions are processed as unknown)
Dependency requirements:
- Compatible version of Xcode:
14.1.0
v11.0.0
Mapbox Maps SDK iOS v11 enables the Mapbox Standard Style, a new realistic 3D lighting system, building shadows and many other visual enhancements, Swift UI support, an updated ergonomic API for working with map styles and custom data, and much more! You can learn about each new feature and how to upgrade in the Migration guide. Additionally, be sure to check out our topic-by-topic documentation on our Docs website.
v11.0.0
Features ✨ and improvements 🏁
Map Styles - Documentation & Migration Guide
- Introduce the Mapbox Standard Style as the default style
- 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:)
- Introduce
Slot
struct with static properties to manage adding layers to pre-specified slots in a style import. See documentation here. - Refactor
MapboxMap.loadStyle
to cancel previous style loads when called multiple times. - New experimental
StyleManager.load(mapStyle:transition:completion)
method to loadMapStyle
inMapboxMap
, orSnapshotter
:mapboxMap.load(mapStyle: .standard(lightPreset: .dawn, showRoadLabels: false)) { _ in print("Style is loaded") }
- Add "keep-legacy-style-pack" style pack load extra option that prevents from the style package removal from the legacy storage
- Relax style parsing of an unknown style layer properties
StyleColor
- add support for all color formats as defined by Mapbox Style Spec.- Add required
id
property toSource
. After that changeid
should 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 creatingStylePackLoadOptions
andTilesetDescriptorOptions
. - Deprecate
MapboxMap/style
andSnapshotter/style
, from now on you can access Style APIs directly fromMapboxMap
andSnapshotter
instance.
Swift UI - Documentation & Migration Guide
Note: SwiftUI support is an experimental feature, its API may be changed until it stabilizes.
In v11 our approach to Swift UI has been updated significantly. Please see our Swift UI documentation here to get started.
- To enable or disable
safeAreaInsets
when calculating a camera's padding in every viewport, you can useMap.usesSafeAreaInsetsAsPadding(_:)
, additionally, you can add extra global safe area insets to the map using modifierMap.additionalSafeAreaInsets
- Use
MapViewAnnotation
instead ofViewAnnotation
to display view annotations in SwiftUI.Map { MapViewAnnotation(coordinate: coordinate) { Text("🏠") } .allowOverlap(false) .variableAnchors([ViewAnnotationAnchorConfig(anchor: .bottom)]) }
- 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")
}
Map Events - Migration Guide
- Map events have been reworked:
- Now all Map events payloads are serialize-free, which brings more type safety and eliminates possible deserialization errors;
- The
MapboxMap
andSnapshotter
now exposeon
-prefixed properties that allows you to subscribe to map events viaobserve
andobserveNext
methods: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
AnyCancelable
object returned fromobserve
andobserveNext
should 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.onNext
have been deprecated; - Methods
MapboxMap.observe
andSnapshotter.observe
have been removed.
Lights - Migration Guide
- Enable rendering of fill extrusion flood lights on the ground with fully transparent fill extrusions
- Align hillshade illumination direction with 3d lights
- Flood lighting and AO ground contribution in draped mode
- Increase rendering performance of shadows
- Refactor style Light API: introduce
AmbientLight
,DirectionalLight
,FlatLight
and methods to set them. - Introduce
hsl
,hsla
,random
expressions. - Introduce
measureLight
expression lights configuration property. - Introduce experimental
BackgroundLayer/backgroundEmissiveStrength
,CircleLayer/circleEmissiveStrength
,FillLayer/fillEmissiveStrength
,LineLayer/lineEmissiveStrength
,SymbolLayer/iconEmissiveStrength
,SymbolLayer/textEmissiveStrength
,ModelLayer/modelEmissiveStrength
,ModelLayer/modelRoughness
,ModelLayer/modelHeightBasedEmissiveStrengthMultiplier
APIs. - Introduce experimental
FillExtrusionLayer/fillExtrusionAmbientOcclusionWallRadius
,FillExtrusionLayer/fillExtrusionAmbientOcclusionGroundRadius
,FillExtrusionLayer/fillExtrusionAmbientOcclusionGroundAttenuation
,FillExtrusionLayer/fillExtrusionFloodLightColor
,FillExtrusionLayer/fillExtrusionFloodLightIntensity
,FillExtrusionLayer/fillExtrusionFloodLightWallRadius
,FillExtrusionLayer/fillExtrusionFloodLightGroundRadius
,FillExtrusionLayer/fillExtrusionFloodLightGroundAttenuation
,FillExtrusionLayer/fillExtrusionVerticalScale
APIs. - Introduce
FillExtrusionLayer.fillExtrusionRoundedRoof
,FillExtrusionLayer.fillExtrusionEdgeRadius
API. - Introduce
lineDepthOcclusionFactor
API forLineLayer
s andPolylineAnnotiationManager
.
GeoJSON and Query Rendered Features
- Expose new Style APIs for partial GeoJSON update:
MapboxMap.addGeoJSONSourceFeatures(forSourceId:features:dataId:)
MapboxMap.updateGeoJSONSourceFeatures(forSourceId:features:dataId:)
MapboxMap.removeGeoJSONSourceFeatures(forSourceId:featureIds:dataId:)
- Different data types are now used for
querySourceFeatures
andqueryRenderedFeatures
:QueriedSourceFeature
andQueriedRenderedFeature
.QueriedRenderedFeature
has a new fieldlayer
which 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.resetFeatureState
method. - Add
callback
argument to theMapboxMap
methodsgetFeatureState
,setFeatureState
,removeFeatureState
. - Return
cancelable
from theMapboxMap
methods :getFeatureState
,setFeatureState
,removeFeatureState
,querySourceFeatures
,getGeoJsonClusterLeaves
,getGeoJsonClusterChildren
,getGeoJsonClusterExpansionZoom
.
Annotations - Documentation
- Introduce new Map Content Gesture System, please refer to Map Content Gestures Guide for more information and guidance.
- Added
allowOverlapWithPuck
andignoreCameraPadding
options toViewAnnotation
andMapViewAnnotation
. - Support
slot
for annotation managers and annotation groups. - New ViewAnnotation class is added to simplify work with view annotations, use it instead of
ViewAnnotationOptions
. - Support for Dynamic View Annotations. Use them to attach View annotations to any feature rendered by map, for example you can visualize additional information along the routes, areas, or points. The annotations will reposition themselves when user pans the map. Check the [ViewAnnotation](http...