Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,9 @@ final class MapKitPolygonOverlayRenderer: AbstractPolygonOverlayRenderer<MKPolyg
/// リングをコア共通の補間(geodesic は球面補間・非 geodesic は線形補間)で密度化して
/// `CLLocationCoordinate2D` へ変換する。外周・穴の両方に同じ処理を通す。
private func ring(_ points: [GeoPointProtocol], geodesic: Bool) -> [CLLocationCoordinate2D] {
let geoPoints: [GeoPointProtocol] = geodesic
? WGS84Geodesic.createInterpolatePoints(points)
: Planar.createInterpolatePoints(points)
return geoPoints.map { CLLocationCoordinate2D(latitude: $0.latitude, longitude: $0.longitude) }
// 閉じる辺(末尾 → 先頭)も他の辺と同じく補間する(塗りと輪郭が同じ MKPolygon)。
// geodesic は大圏、geodesic=false は緯度経度の線形補間(ポリラインの false と同じ線)。
densifyPolygonRing(points, geodesic: geodesic).map { CLLocationCoordinate2D(latitude: $0.latitude, longitude: $0.longitude) }
}
}

Expand Down
Loading