From ee93141350ff3e4ab66b192be40d19ad7c471a62 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 22 Aug 2026 14:25:16 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9A=A1=20Remove=20redundant=20path.move?= =?UTF-8?q?=20in=20polyline=20snapshot=20loop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: esenmx <43244505+esenmx@users.noreply.github.com> --- .../Sources/mapkit_flutter/Overlays/FlutterPolyline.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/darwin/mapkit_flutter/Sources/mapkit_flutter/Overlays/FlutterPolyline.swift b/darwin/mapkit_flutter/Sources/mapkit_flutter/Overlays/FlutterPolyline.swift index 389e4e9..aaf11e6 100644 --- a/darwin/mapkit_flutter/Sources/mapkit_flutter/Overlays/FlutterPolyline.swift +++ b/darwin/mapkit_flutter/Sources/mapkit_flutter/Overlays/FlutterPolyline.swift @@ -80,9 +80,8 @@ extension StyledPolyline { } path.move(to: snapshot.point(for: first)) - for coordinate in coordinates { + for coordinate in coordinates.dropFirst() { path.addLine(to: snapshot.point(for: coordinate)) - path.move(to: snapshot.point(for: coordinate)) } shapeLayer.path = path.cgPath From d28cba5b5e9cbba25ef06293c23a23488322ea15 Mon Sep 17 00:00:00 2001 From: Mehmet Esen Date: Sun, 23 Aug 2026 16:48:22 +0300 Subject: [PATCH 2/2] docs(darwin): note single-subpath invariant in polyline snapshot path Guard comment above the move(to:) so the per-segment move is not re-added: lineJoin and dash phase only apply within one subpath, matching MKPolylineRenderer. Co-Authored-By: Claude Fable 5 --- .../Sources/mapkit_flutter/Overlays/FlutterPolyline.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/darwin/mapkit_flutter/Sources/mapkit_flutter/Overlays/FlutterPolyline.swift b/darwin/mapkit_flutter/Sources/mapkit_flutter/Overlays/FlutterPolyline.swift index aaf11e6..90313b5 100644 --- a/darwin/mapkit_flutter/Sources/mapkit_flutter/Overlays/FlutterPolyline.swift +++ b/darwin/mapkit_flutter/Sources/mapkit_flutter/Overlays/FlutterPolyline.swift @@ -79,6 +79,7 @@ extension StyledPolyline { return shapeLayer } + // Single subpath: lineJoin and dash phase only apply within a subpath, matching MKPolylineRenderer. path.move(to: snapshot.point(for: first)) for coordinate in coordinates.dropFirst() { path.addLine(to: snapshot.point(for: coordinate))