Skip to content

v2.6.0

Latest
Compare
Choose a tag to compare
@maios maios released this 14 Feb 12:39
· 11 commits to main since this release

Features ✨ and improvements 🏁

  • Introduce the experimental Interactions API, a toolset that allows you to handle interactions on both layers and basemap features for styles. This API introduces a new concept called Featureset, which allows Evolving Basemap styles, such as Standard, to export an abstract set of features, such as POI, buildings, and place labels, regardless of which layers they are rendered on. An Interaction can then be targeted to these features, modifying their state when interacted with. For example, you can add a TapInteraction to your map which targets the buildings Featureset. When a user taps on a building, the building will be highlighted and its color will change to blue.
var tapInteraction = TapInteraction(StandardBuildings(),
    (_, feature) {
  mapboxMap.setFeatureStateForFeaturesetFeature(feature, StandardBuildingState(highlight: true));
  log("Building group: ${feature.group}");
});
mapboxMap.addInteraction(tapInteraction);

Specific changes:

  • Introduce the experimental MapboxMap.addInteractions method, which allows you to add interactions to the map.
  • Introduce TapInteraction and LongTapInteraction, which allow you to add tap and longTap interactions to the map.
  • Introduce FeaturesetDescriptor -- and convenience descriptors for StandardBuildings, StandardPOIs, and StandardPlaceLabels -- which allow you to describe the featureset you want Interactions to target.
  • Introduce low-level methods for creating and manipulating interactive features: queryRenderedFeatures, querySourceFeatures, setFeatureState, getFeatureState, removeFeatureState, resetFeatureState
  • For more guidance with using these new features see interactive_features_example.dart.
  • Align tap propagation behavior on Android and iOS.
  • Add support for Swift Package Manager.

Bug fixes 🐞

  • [Android] Fix bug in .setStyleImportConfigProperties() where map values were not being set correctly.
  • [Android] Fix throwing NPE when converting a map with null values to a Value.
  • Align tap propagation behavior on Android and iOS.

Dependency Updates

  • Update Mapbox Maps SDK to 11.10.0
    • For platform-specific updates see: iOS & Android