@@ -9,11 +9,15 @@ import android.os.Parcel
99import com.google.android.gms.dynamic.IObjectWrapper
1010import com.google.android.gms.dynamic.ObjectWrapper
1111import com.google.android.gms.maps.model.Cap
12+ import com.google.android.gms.maps.model.JointType
1213import com.google.android.gms.maps.model.LatLng
1314import com.google.android.gms.maps.model.PatternItem
1415import com.google.android.gms.maps.model.internal.IPolylineDelegate
1516import com.mapbox.mapboxsdk.plugins.annotation.Line
1617import com.mapbox.mapboxsdk.plugins.annotation.LineOptions
18+ import com.mapbox.mapboxsdk.style.layers.Property.LINE_JOIN_BEVEL
19+ import com.mapbox.mapboxsdk.style.layers.Property.LINE_JOIN_MITER
20+ import com.mapbox.mapboxsdk.style.layers.Property.LINE_JOIN_ROUND
1721import com.mapbox.mapboxsdk.utils.ColorUtils
1822import org.microg.gms.maps.mapbox.GoogleMapImpl
1923import org.microg.gms.maps.mapbox.LiteGoogleMapImpl
@@ -40,6 +44,11 @@ abstract class AbstractPolylineImpl(private val id: String, options: GmsLineOpti
4044
4145 val baseAnnotationOptions: LineOptions
4246 get() = LineOptions ()
47+ .withLineJoin(when (jointType) {
48+ JointType .BEVEL -> LINE_JOIN_BEVEL
49+ JointType .DEFAULT -> LINE_JOIN_MITER
50+ else -> LINE_JOIN_ROUND
51+ })
4352 .withLineWidth(width / dpiFactor.invoke())
4453 .withLineColor(ColorUtils .colorToRgbaString(color))
4554 .withLineOpacity(if (visible) 1f else 0f )
@@ -112,6 +121,7 @@ abstract class AbstractPolylineImpl(private val id: String, options: GmsLineOpti
112121
113122 override fun setJointType (jointType : Int ) {
114123 this .jointType = jointType
124+ update()
115125 }
116126
117127 override fun getJointType (): Int = jointType
@@ -201,6 +211,7 @@ class PolylineImpl(private val map: GoogleMapImpl, id: String, options: GmsLineO
201211 lineWidth = it.options.lineWidth
202212 lineColor = it.options.lineColor
203213 lineOpacity = it.options.lineOpacity
214+ lineJoin = it.options.lineJoin
204215 }
205216 } else {
206217 annotations = annotations + it
0 commit comments