Skip to content

v11.7.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@evil159 evil159 released this 03 Sep 14:33
· 16 commits to main since this release

⚠️⚠️⚠️ Note ⚠️⚠️⚠️

This version contains update Turf to 3.0.0 version. That version introduce breaking change – there is no more RawRepresentable conformances for Array and Dictionary system types. If you were relying on the init(rawValue:) function or rawValue property you will find migration instructions in the changelog.

Features ✨ and improvements 🏁

  • 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 MapContentGestuereContext to the InteractionContext

  • Introduce a new RenderedQueryGeometry type to replace multiple MapboxMaps.queryRenderedFeatures overloads.

  • [SwiftUI] Introduce new experimental FeatureState primitive.

  • 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.
    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 RawRepresentable conformances for Array and Dictionary system types. If you were relying on the init(rawValue:) function or rawValue property, you can use the substitution instead:

    • init(rawValue:) -> init(turfRawValue:)
    • rawValue -> turfRawValue
  • Remove experimental model-front-cutoff property from ModelLayer

  • Expose experimental ClipLayer.clipLayerScope, SymbolLayer.symbolElevationReference and SymbolLayer.symbolZOffset.

  • Most of public value types was marked as Sendable now, to facilitate adoption of Swift 6 concurrency model for SDK clients.

  • autoMaxZoom property exposed for GeoJSONSource to fix rendering issues with FillExtrusionLayer in some cases

Dependencies

Dependency requirements:

  • Compatible version of Xcode: 15.2.0