Skip to content

Releases: maplibre/maplibre-compose

v0.9.1

16 Jun 09:40
f595fb2

Choose a tag to compare

What's Changed

  • default text link style for attribution button by @sargunv in #436
  • fix programmatic vector source crashing on ios by @sargunv in #437
  • fix programmatic vector source not correctly handling Compose resources by @sargunv in #438

Full Changelog: v0.9.0...v0.9.1

v0.9.0

14 Jun 06:48
78e6053

Choose a tag to compare

Breaking

  • Remove StyleState.getSource(id: String), and instead make StyleState.sources a map of id to Source (#379, @sargunv)
  • Change the rememberGeoJsonSource to wrap the data in a new GeoJsonData sealed interface (#411, @michalgwo)
  • Change Source to expose attribution text as an HTML string instead of a List (#426, @sargunv) to fix some bugs with the expanding attribution button
  • Overhauled gesture, ornament, debug, and framerate settings into the new platform-specific MapOptions object (#428, @sargunv)
    • If you're configuring these beyond our presets, you'll need to work with this in expect/actual code. This is more inconvenient to use, but allows our API to be more correct and granular for each platform.

Features

  • Add support for managing offline map data on Android and iOS (#386, @sargunv)
  • Add support for customizing the home orientation of the compass button (#394, @sargunv)
  • Add support for passing data to a GeoJsonSource directly as a JSON string (#411, @michalgwo)
  • Add i18n strings for the material3 compass (#421, @westnordost)
  • Update the expanding attribution button to show the full attribution content instead of just links (#426), and not break lines within a single attribution (#427) (@sargunv)
  • Android: Make the map's foreground load color configurable, and default to transparent instead of light gray to prevent a light flash on dark mode (#428, @sargunv)

Fixes

  • Fixed an issue with the PointerPin not updating correctly with infrequently updated Positions (#395, @sargunv)
  • Locale-aware number formatting in material3 scale bar (#419, @westnordost)
  • Fixed an issue with how ornament padding is applied on iOS when any insets have been consumed (#432, @sargunv)

Documentation

New Contributors

Full Changelog: v0.8.2...v0.9.0

v0.8.2

27 May 22:28
756fda7

Choose a tag to compare

  • Fix crashing on iOS when rotating the device with a map that updates the style rapidly (@sargunv: #378) (thanks @michalgwo for catching this!)

v0.8.1

27 May 15:19
98bb902

Choose a tag to compare

v0.8.0

27 May 04:34

Choose a tag to compare

Breaking:

  • Overhaul the scale bar measure API using the alchemist library to make it easier to define custom scale bars (#350) (@sargunv)
  • Overhaul the Material3 attribution button from a dialog based implementation to an expanding button similar to MapLibre JS, in order to ensure this attribution info component complies with the OSM license (#349) (@westnordost, @michalgwo, and @sargunv)
  • Revise the cluster properties API, as it was incorrect before (#365) (@sargunv and @westnordost)
  • Revise the camera projection querying API to make it safer to use (#372) (@sargunv)
  • Revise the image expression API to support SDF conversion during Painter rasterization (#373) (@sargunv and @westnordost)

Changes:

  • Add new "pointer pin" material3 component (#364) (@westnordost)
  • Add an option to enable textureMode on Android to improve compatibility with some transforms at the cost of performance (#354) (@sargunv)
  • Update to the latest MapLibre Native (#368)

Fixes:

  • Update style state for programmatically added sources (#352) (@sargunv)
  • Fix crash when rotating iOS device with the attribution visible (#357) (@sargunv)
  • Make GeoJsonSource cluster properties not crash on iOS (#365) (@sargunv)

Documentation:

  • Fix Android Vulkan setup guide (#359)

v0.7.0

18 May 22:59
9a25d7e

Choose a tag to compare

This release is primarily a polish and bug fix release, though some fixes and features involve minor breaking changes (fixing typos, tweaked signatures, etc).

Contributors: @michalgwo @dayanruben @SudaNix @Vichy97 @westnordost @sargunv

Changes

Features:

  • Upgrade to Kotlin 2.1.20, Compose 1.8.0, and the latest MapLibre Native SDKs (#317)
  • Replace StyleState source getter with a proper State field (#291)
  • Make compass button more customizable (#251)
  • Expose sources and query source features (#255)
  • Support animating camera to bounding box (#258)
  • Support programmatically configuring tile set for raster and vector tile sources (#319)
  • Change scale bar defaults, add support for configuring stroke width, and fix some related layout issues (#290)
  • Persist camera state across configuration changes on Android (#277)
  • Add isCameraMoving boolean to camera state (#325)

Fixes:

  • Fix crash when switching to certain styles (#245)
  • Fix crash when switching styles too quickly (#269)
  • Don't show scale bar before map is initialized (#249)
  • Fix onLongClick callback not working on Android (#253)
  • Fix incorrect compass behavior with uneven camera padding (#282)
  • Fix delay between loading placeholder map and applying user settings (#278)
  • Fix a typo (breaking rename) (#281)
  • Fix null dereference when getting position from screen location on iOS (#297)
  • Fix cameraState.awaitInitialized() resolving too early (#315)
  • Fix (workaround) upstream crash on iOS when selecting between multiple images using a switch expression (#327)
  • Fix incorrect zoom state upon map size changes on iOS (#333)
    • and some other incorrect results upon map size changes on iOS (#335)
  • Fix incorrect long press recognition on iOS (#339)

Docs:

  • Add a raster style to the style switcher demo (#318)
  • Fix broken local styles in style switcher demo (#264)
  • Add a new demo for fully local styles and tiles (#320 and #322)
  • Various minor additions to API Reference

Full Changelog: v0.6.0...v0.7.0

New Contributors

v0.6.0

12 Jan 06:46
fad1b99

Choose a tag to compare

Breaking from 0.5.x:

  • @westnordost Overhauled the material 3 scale bar
    • This results in minor breaking changes to the scale bar function parameters
    • See the video in #232 to see it in action
  • @westnordost: fixed incorrect typing for a SymbolLayer property: #233
    • This property is currently unimplemented on all platforms; it's unsupported on MapLibre Native, and we don't support layer styling on MapLibre JS yet

Additional fixes:

  • @sargunv fixed a crash on Android with certain URL formats: #241

v0.5.1

03 Jan 02:30
651db94

Choose a tag to compare

Contributors: @sargunv

  • Android: fixed an incompatibility with certain Android versions: #224
    • theoretically all Android < 15 should've been affected, but not all phones were
  • Desktop: fixed an incompatibility with JVM < 23: #223
  • Android: removed a fix for #15 due to a performance hit. Will add this back as an opt-in feature later.
  • Fixed a typo on the documentation site.

v0.5.0

31 Dec 22:25
18ce6fe

Choose a tag to compare

Contributors:

Breaking from v0.4.0:

  • changed span in format to accept TextUnit for text size instead of a float scale
  • relocated the expressions DSL package; it's now dev.sargunv.maplibrecompose.expressions.dsl
    • expression related things are now in their own module, provided as an api dependency by the main module

Other changes:

  • Added support for limiting the zoom and pitch range of the camera.
  • Added support for compose Painter in image expressions, so you can easily add vector images to the style
    • Note: they're converted to a bitmap automatically by the library, so they're not actually scaled like vector graphics within MapLibre. You can provide a size parameter to customize the size they're rendered at.
  • Added support for adding SDF bitmaps to the style.
  • Added some bare Kotlin type overloads for expression functions so you don't need as many const all over.
  • Added experimental web and desktop support.
    • Desktop and web both support:
      • Rendering a map with local and remote styles
      • Configuring ornament and gesture settings
      • Limiting zoom and pitch
    • Web additionally supports:
      • Map interaction
      • Observing and updating the camera position
      • Querying the projection
      • Querying rendered features
    • Note that some pre-existing APIs (ornament settings, gesture settings) don't do exactly what their name indicates on desktop and web due to differences between MapLibre Native and Desktop. This'll be cleaned up in a future release.

Documentation changes:

  • Added desktop and web installation guides

v0.4.0

24 Dec 11:02
388d259

Choose a tag to compare

There's some major regressions in v0.3.0, so here's a quick v0.4.0 with a bunch of fixes and a couple features.

Contributors:

Breaking from v0.3.0:

  • Changed the format expression params and types to make it easier to use
  • Removed the bare format overload as you can now pass a string expression directly to textField

Other changes:

  • Added support for images:
    • The image expression now accepts an ImageBitmap, so you can load Compose drawable resources and display them on the map
    • The format expression now accepts image expressions in addition to string expressions, so you can intermingle images with text in a formatted expression
  • Updated the Material 3 scale bar:
    • Made it easier to read on busy backgrounds
    • Added localizations for unit symbols and support for RTL orientations
  • Fixed SymbolLayer crashing on iOS when present
  • Fixed SymbolLayer causing a crash when textField is unset
  • Disabled textVariableAnchorOffset because of an upstream bug making it unusable

Documentation changes:

  • Added a demo of loading and displaying markers (images) in a SymbolLayer
  • Fixed blank attribution on the style switcher demo
  • Fixed camera follow demo to end follow on compass tap (material3 compass only)