Skip to content

Releases: p-lr/MapCompose

2.9.2

09 Sep 16:28
Compare
Choose a tag to compare
  • Update Kotlin 1.9.10
  • Update Compose BOM 2023.09.00, and Compose compiler 1.5.3

2.9.1

03 Sep 19:56
Compare
Choose a tag to compare
  • Fix updatePath api: the zIndex parameter is null by default
  • This release is based on Compose BOM 2023.08.00

2.9.0

02 Sep 13:18
Compare
Choose a tag to compare
  • Added zIndex property for paths
  • Added isPathWithinRange path api. Useful to check whether or not a point is a near a path.
  • Added allPaths helper api to loop over all paths
  • Fixed an issue which would cause all paths to be clickable when only one path is clickable
  • Compose BOM updated to 2023.08.00 and target sdk 34

2.8.1

31 Jul 07:48
Compare
Choose a tag to compare
  • Fix rare ConcurrentModificationException thrown when adding points to an existing path
  • Fix potential issue when using updatePath with different PathData instances
  • Compose BOM updated to 2023.06.01

2.8.0

12 Jul 20:35
Compare
Choose a tag to compare
  • Paths can now be clickable. addPath and updatePath apis accept a new clickable parameter.
  • A new onPathClick api works the same way as onMarkerClick:
fun MapState.onPathClick(cb: (id: String, x: Double, y: Double) -> Unit)

On path click, the registered callback provides the id of the path, and the relative coordinates of the clicked point on the path.

  • The demo app is updated to show how to use this new onPathClick api.
  • This release is based on Compose BOM to 2023.05.01

2.7.1

30 May 22:17
Compare
Choose a tag to compare

2.7.1 only slightly changes path join (now having rounded corners).
2.7.0 release notes are important and are reported below:

This feature release is mainly focused on path apis.

  • Bug fix: Path width was set in pixels, not dp. So if the width was set like:
mapState.addPath("pathId", width = 12.dp) { .. }

The path, which was 12px wide in previous versions of the library, will now appear much thicker than it should be.
So after updating, you should set the desired width in dp. The default is 4.dp.

  • Paths rendering is improved. They're no longer made of series of lines (see #85 )
  • Paths are now automatically simplified depending on the scale, using Ramer-Douglas-Peucker algorithm. This improves performance when zooming-out.
  • The simplification can be tweaked using the new simplify parameter for addPath and updatePath apis.
  • A new cap parameter for path apis allows for customizing path start and end cap. The default is Cap.Round.
  • New overload for addPath, taking a builder block with a PathDataBuilder as receiver. This simplifies path creation. The demo is updated.
  • This release is still based on Compose BOM to 2023.05.01

2.7.0

29 May 11:51
Compare
Choose a tag to compare

This feature release is mainly focused on path apis.

  • Bug fix: Path width was set in pixels, not dp. So if the width was set like:
mapState.addPath("pathId", width = 12.dp) { .. }

The path, which was 12px wide in previous versions of the library, will now appear much thicker than it should be.
So after updating, you should set the desired width in dp. The default is 4.dp.

  • Paths rendering is improved. They're no longer made of series of lines (see #85 )
  • Paths are now automatically simplified depending on the scale, using Ramer-Douglas-Peucker algorithm. This improves performance when zooming-out.
  • The simplification can be tweaked using the new simplify parameter for addPath and updatePath apis.
  • A new cap parameter for path apis allows for customizing path start and end cap. The default is Cap.Round.
  • New overload for addPath, taking a builder block with a PathDataBuilder as receiver. This simplifies path creation. The demo is updated.
  • This release is still based on Compose BOM to 2023.05.01

2.6.1

11 May 16:39
Compare
Choose a tag to compare
  • Update Compose BOM to 2023.05.01, which implies Kotlin 1.8.20
  • Behavior change: onMarkerClick callback is no longer invoked for clusters
  • Update kotlinx.coroutines to 1.7.0
  • Some Compose dependencies are declared as api.

2.5.0

26 Mar 19:52
Compare
Choose a tag to compare
  • Update Compose BOM to 2023.03.00, and Kotlin 1.8.10. The application code needs to be updated as well.
  • New overload for centerOnMarker api:
suspend fun MapState.centerOnMarker(
    id: String,
    destScale: Float,
    destAngle: AngleDegree,
    animationSpec: AnimationSpec<Float> = SpringSpec(stiffness = Spring.StiffnessLow)
)

This allows for scaling, rotating, and scrolling the map at the same time while centering on a marker.

  • The setVisibleAreaPadding api with Dp inputs is no longer a @Composable function. The "VisibleAreaPadding" demo is updated.

2.4.1

21 Jan 10:26
Compare
Choose a tag to compare
  • Update Kotlin 1.8.0
  • Use Compose BOM 2023.01
  • Compose compiler 1.4.0
  • clipShape parameter of addMarker api is made no-op and deprecated.