Releases: maplibre/maplibre-compose
Releases · maplibre/maplibre-compose
v0.3.0
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
styleUrlanddataUrltouri
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-material3module - Includes a compass, scale bar, and an attribution button / dialog
- And disappearing versions of the compass and scale bar
- In a new
- 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
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 acceptFloatliterals - Change
Expression<Number>toExpression<Dp>where appropriate - Replace
Expression<Point>withExpression<DpOffset>orExpression<Offset> - Replace
Expression<Insets>withExpression<PaddingValues.Absolute> - Most functions for working with expressions have overloads for the new types, but in some edge cases you may need to use
.dpand.valueto convert betweenExpression<Dp>andExpression<Number>.
- Relocate some types. For example,
.core.dataand.core.cameraare 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
MaplibreMapcomposable - Optimize default values of layer property expressions to avoid allocating new
Expressionobjects 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
MaplibreMapcomposable 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
apidependency 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
- and relocate the pre-existing Dokka reference site to /api/ under the main docs site
- Upgrade API reference docs with links to external docs and to source code
- Add some missing API reference documentation
Initial release
Adds support for:
- Instantiate an interactive map in Compose UI
- Load a map style via URL, including
- Remote (online) styles
- Local asset styles
with Compose resources
- Configure the map UI, including:
- Position ornaments (compass, logo, attribution) with Compose
PaddingValuesand alignment - Toggle map gestures
- Position ornaments (compass, logo, attribution) with Compose
- 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
onClickandonLongClickcallbacks 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