From 29b278d76d517814d786bcf573c86e7514698219 Mon Sep 17 00:00:00 2001 From: Masashi Katsumata Date: Sat, 7 Nov 2026 21:47:37 -0800 Subject: [PATCH 1/2] Interpolate the closing edge of geodesic polygons ringPath densified a geodesic ring with createInterpolatePoints, which only interpolates between neighbouring points. Rings arrive open, so the closing edge (last vertex -> first) stayed a straight chord in both fill and outline (Boston -> London -> Iceland: the Iceland -> Boston edge). Use ios-sdk-core's densifyGeodesicRing. geodesic=false is unchanged. Requires the ios-sdk-core release that adds densifyGeodesicRing. --- .../polygon/GoogleMapPolygonOverlayRenderer.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/MapConductorForGoogleMaps/polygon/GoogleMapPolygonOverlayRenderer.swift b/Sources/MapConductorForGoogleMaps/polygon/GoogleMapPolygonOverlayRenderer.swift index 100c572..0be4433 100644 --- a/Sources/MapConductorForGoogleMaps/polygon/GoogleMapPolygonOverlayRenderer.swift +++ b/Sources/MapConductorForGoogleMaps/polygon/GoogleMapPolygonOverlayRenderer.swift @@ -110,7 +110,9 @@ final class GoogleMapPolygonOverlayRenderer: AbstractPolygonOverlayRenderer Date: Sat, 7 Nov 2026 23:26:58 -0800 Subject: [PATCH 2/2] Densify the closing edge of non-geodesic polygons too A geodesic=false ring went through Planar.createInterpolatePoints, which only interpolates between neighbouring points, so the closing edge (last vertex -> first) stayed one straight Web Mercator segment while the other edges - and polylines with geodesic=false - follow linear lat/lng interpolation. Use ios-sdk-core's densifyPolygonRing for both modes (it replaces the unreleased densifyGeodesicRing). Same as android-for-googlemaps. Requires the ios-sdk-core release that adds densifyPolygonRing. --- .../polygon/GoogleMapPolygonOverlayRenderer.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/MapConductorForGoogleMaps/polygon/GoogleMapPolygonOverlayRenderer.swift b/Sources/MapConductorForGoogleMaps/polygon/GoogleMapPolygonOverlayRenderer.swift index 0be4433..b9c57cc 100644 --- a/Sources/MapConductorForGoogleMaps/polygon/GoogleMapPolygonOverlayRenderer.swift +++ b/Sources/MapConductorForGoogleMaps/polygon/GoogleMapPolygonOverlayRenderer.swift @@ -92,7 +92,9 @@ final class GoogleMapPolygonOverlayRenderer: AbstractPolygonOverlayRenderer GMSPath { if !geodesic { - return makePath(Planar.createInterpolatePoints(points)) + // geodesic=false も閉じる辺(末尾 → 先頭)を緯度経度で線形補間する(輪郭のポリラインと同じ線。 + // 補間しないと閉じる辺だけメルカトルの直線になる)。 + return makePath(densifyPolygonRing(points, geodesic: false)) } let camera = mapView.camera @@ -112,7 +114,7 @@ final class GoogleMapPolygonOverlayRenderer: AbstractPolygonOverlayRenderer