mapbox-maps-android icon indicating copy to clipboard operation
mapbox-maps-android copied to clipboard

PolylineAnnotationManager lineCap doesn't work

Open OliverCulleyDeLange opened this issue 1 year ago • 0 comments

Environment

  • Android OS version: 12
  • Devices affected: OP Nord
  • Maps SDK Version: 'com.mapbox.maps:android:10.14.0'

Observed behavior and steps to reproduce

Setting lineCap property on PolylineAnnotationManager has no effect

mapView.getMapboxMap()
      .apply {
        val lines = mapView.annotations.createPolylineAnnotationManager().apply {
          lineCap = LineCap.ROUND
        }
        setCamera(
          CameraOptions.Builder()
            .center(Point.fromLngLat(0.0, 51.0))
            .zoom(9.0)
            .build()
        )
        addOnMapLongClickListener { point ->
          lines.create(PolylineAnnotationOptions()
            .withPoints(listOf(point, Point.fromLngLat(point.longitude() + 0.1, point.latitude() + 0.1)))
            .withLineColor("rgba(255, 0, 0, 255)")
            .withLineWidth(10.0)
            .withLineJoin(LineJoin.ROUND)
          )
          true
        }
      }

image

Expected behavior

Line cap should be round.

OliverCulleyDeLange avatar Jun 26 '23 11:06 OliverCulleyDeLange