diff --git a/src/polygon/HerePolygonOverlayRenderer.ts b/src/polygon/HerePolygonOverlayRenderer.ts index 5be32a7..492bfbd 100644 --- a/src/polygon/HerePolygonOverlayRenderer.ts +++ b/src/polygon/HerePolygonOverlayRenderer.ts @@ -9,7 +9,7 @@ */ import { AbstractPolygonOverlayRenderer, - densifyAndNormalize, + densifyPolygonRing, type PolygonEntity, type PolygonState, } from '@mapconductor/js-sdk-core'; @@ -98,7 +98,9 @@ function buildLineString( // Core pipeline: densify (great-circle when geodesic, linear lat/lng // otherwise — Android's straight-line semantics) and normalize into HERE's // [-180, 180] longitude range. - for (const point of densifyAndNormalize(points, geodesic)) { + // リングの閉じる辺(末尾 → 先頭)も他の辺と同じく補間する(輪郭と同じ線にする)。 + const ring = densifyPolygonRing(points, geodesic).map((point) => point.normalize()); + for (const point of ring) { lineString.pushPoint(toGeoCoordinates(point)); } return lineString;