Skip to content

Releases: maplibre/maplibre-compose

v0.3.0

21 Dec 04:22
5b238dd

Choose a tag to compare

Contributors:

Breaking from v0.2.0:

  • Overhauled the expression DSL:
    • Redesigned the expression type system, especially improving its handling of expression arithmetic with units
    • Changed function names and signatures from the original style spec style to more Kotlin idiomatic ones
    • Added some more enums instead of strings (geometry type, typeof, etc)
    • Stopped providing expressions functions in the map content scope automatically. You must now import them explicitly, like most other functions.
  • Renamed various URL parameters like styleUrl and dataUrl to uri

Other API changes:

  • Added the native scale bar ornament on both Android and iOS
  • Added new Material 3 controls as an alternative to the built in ornaments from MapLibre SDKs
    • In a new maplibre-compose-material3 module
    • Includes a compass, scale bar, and an attribution button / dialog
    • And disappearing versions of the compass and scale bar
  • Added tileSize parameter on RasterSource
  • Upgraded to Kotlin 2.1.0
  • Upgraded to MapLibre Android v1.7.1 and MapLibre iOS v6.9.0

Documentation changes:

  • Add instructions to use the Vulkan backend on Android
  • Added a bunch more missing kdoc
  • Demo app now matches dark styles to a dark material theme, and showcases loading local styles

v0.2.0

07 Dec 03:22

Choose a tag to compare

This releases focuses on overhauling expression typing and fleshing out the camera state API.

Contributors:

Breaking changes from v0.1.0:

  • Require click handlers to consume or pass the event, optionally preventing later handlers from receiving it
  • Overhaul layer property expressions to:
    • Replace Strings with Enums in many fields, wherever appropriate
    • Narrow Expression<Number> to only accept Float literals
    • Change Expression<Number> to Expression<Dp> where appropriate
    • Replace Expression<Point> with Expression<DpOffset> or Expression<Offset>
    • Replace Expression<Insets> with Expression<PaddingValues.Absolute>
    • Most functions for working with expressions have overloads for the new types, but in some edge cases you may need to use .dp and .value to convert between Expression<Dp> and Expression<Number>.
  • Relocate some types. For example, .core.data and .core.camera are now directly under the parent .core.

Other API changes:

  • CameraState additions:
    • query rendered features at point/rect with filters
    • convert between screen space and world space coordinates
    • get the world space visible bounding box and region polygon
    • get the reason the camera is moving (user gesture vs programmatic)
  • Add click handlers on the MaplibreMap composable
  • Optimize default values of layer property expressions to avoid allocating new Expression objects when layers recompose
  • Add support for setting the target frame rate of the map renderer, and a callback to listen for the actual frame rate
  • Integrate the Kermit logger passed to the MaplibreMap composable with the iOS/Android SDK's logging configuration
    • This doesn't yet apply to MapLibre Native Android's HTTP logger
  • Make MapLibre Native Android an api dependency so consumers can configure static stuff (like the HTTP logger)
  • Reduce Android minSDK to 23 from 24

Documentation changes

  • Create new documentation website with mkdocs for installation, feature overview, etc
  • Upgrade API reference docs with links to external docs and to source code
  • Add some missing API reference documentation

Initial release

25 Nov 20:26

Choose a tag to compare

Adds support for:

  • Instantiate an interactive map in Compose UI
  • Load a map style via URL, including
  • Configure the map UI, including:
    • Position ornaments (compass, logo, attribution) with Compose PaddingValues and alignment
    • Toggle map gestures
  • Position or animate the camera and read its state
  • Dynamically reload the style (say, to switch themes)
  • Add custom layers to the map with a declarative Composable API, including:
    • Injecting layers in between base style layers (say, to render underneath labels)
    • Defining GeoJSON sources via URL or Spatial K
      geometry
    • Defining raster and vector sources via URL
    • Defining background, circle, fill, extrusion, heatmap, hillshade, line, raster, and
      symbol layers
    • Configuring layers with expressions
    • onClick and onLongClick callbacks with data on which map feature was tapped
  • Replace base style layers, with all the same functionality above
  • Set the maximum FPS of the map