Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
92b1568
Make bearing a clockwise map rotation (#6)
wf9a5m75 Sep 12, 2026
5cbe674
update dependencies (#7)
wf9a5m75 Oct 5, 2026
2ce4ab8
Pick the marker drawn under the tap, label included (#8)
wf9a5m75 Oct 23, 2026
24ee69c
Require ios-sdk-core 1.3.2 (#9)
wf9a5m75 Oct 23, 2026
a37de44
Fix Retina raster tiles and skip unchanged marker lists (#10)
wf9a5m75 Oct 24, 2026
6fc05bc
Add .claude/settings.json
wf9a5m75 Oct 28, 2026
a63de22
Redraw tiles when a tiled marker changes
wf9a5m75 Nov 5, 2026
d241d25
Merge pull request #11 from MapConductor/fix/tiled-marker-refresh
wf9a5m75 Nov 5, 2026
37e0b3c
Draw large polygon sets as raster tiles (PolygonTiler)
wf9a5m75 Nov 7, 2026
1979faf
Call onAdded for markers
wf9a5m75 Nov 7, 2026
88da13a
Make clearOverlays() clear the overlay controllers
wf9a5m75 Nov 8, 2026
fdb2028
Merge pull request #12 from MapConductor/fix/overlay-clear-order
wf9a5m75 Nov 8, 2026
c260d29
Interpolate the closing edge of geodesic polygons
wf9a5m75 Nov 8, 2026
a195afa
Densify the closing edge of non-geodesic polygons too
wf9a5m75 Nov 8, 2026
c31a5e9
Merge pull request #13 from MapConductor/fix/geodesic-polygon-fill
wf9a5m75 Nov 8, 2026
fc16800
Clear strategy-driven markers in clearOverlays()
wf9a5m75 Nov 8, 2026
68f332e
Stack overlays in one band order, whatever order they arrive in
wf9a5m75 Nov 8, 2026
c38ad83
Merge pull request #14 from MapConductor/fix/clear-strategy
wf9a5m75 Nov 8, 2026
9c85023
Merge pull request #15 from MapConductor/fix/overlay-stacking-order
wf9a5m75 Nov 8, 2026
536051d
Build no marker icons before the MarkerListIdentity gate on MapKit
wf9a5m75 Nov 8, 2026
2ae413f
Merge pull request #16 from MapConductor/fix/mapkit-icon-before-gate
wf9a5m75 Nov 9, 2026
3e67412
Merge develop into feat/polygon-tiling
wf9a5m75 Nov 9, 2026
696a447
Merge feat/polygon-tiling into feat/overlay-on-added
wf9a5m75 Nov 9, 2026
a843e09
Merge pull request #17 from MapConductor/feat/polygon-tiling
wf9a5m75 Nov 9, 2026
c40c51f
Draw many polylines as raster tiles
wf9a5m75 Nov 9, 2026
76abf5a
Merge pull request #18 from MapConductor/feat/polyline-tiling
wf9a5m75 Nov 10, 2026
e6644b1
Support bulk Circles with raster tiles
wf9a5m75 Nov 11, 2026
8378043
Merge pull request #19 from MapConductor/feat/circles-bulk-cache
wf9a5m75 Nov 11, 2026
f93e02e
Apply marker zIndex through zPriority
wf9a5m75 Nov 11, 2026
5ec3e05
Re-key annotation zPriority when the map rotates
wf9a5m75 Nov 11, 2026
155a46a
Apply camera paddings and report fov on MapKit
wf9a5m75 Nov 12, 2026
9ea8fe3
Measure the padded target with MapKit's projection
wf9a5m75 Nov 12, 2026
f5807f8
Apply MapKit padding corrections on separate run loop turns
wf9a5m75 Nov 12, 2026
789cacd
Merge pull request #20 from MapConductor/fix/marker-zindex-order
wf9a5m75 Nov 12, 2026
63b6c51
Merge remote-tracking branch 'origin/develop' into feat/camera-paddings
wf9a5m75 Nov 12, 2026
0bb772c
Merge pull request #21 from MapConductor/feat/camera-paddings
wf9a5m75 Nov 12, 2026
087674f
Release 1.4.0
wf9a5m75 Nov 13, 2026
0a325da
Merge pull request #22 from MapConductor/release/1.4.0
wf9a5m75 Nov 13, 2026
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
6 changes: 6 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"attribution": {
"commit": "",
"pr": ""
}
}
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ jobs:
- name: Show toolchain
run: xcodebuild -version && swift --version

# Package.swift は `../ios-sdk-core` があればそれを使い、無ければ released 版
# (`from: "1.1.4"`)へ解決する。CI はこのリポジトリしか checkout しないので
# 常に released 版になり、**コアの未リリースな変更に追随する PR は永久に赤いまま**
# になっていた(CameraBearing をコアへ足したときに踏んだ)。
# 隣に置いてローカル開発と同じ経路に乗せる。同名ブランチがあればそちらを使う。
- name: Check out MapConductorCore next to this package
env:
HEAD_REF: ${{ github.head_ref }}
run: |
url=https://github.com/MapConductor/ios-sdk-core.git
if [ -n "$HEAD_REF" ] && git ls-remote --exit-code --heads "$url" "$HEAD_REF" >/dev/null 2>&1; then
echo "ios-sdk-core: matching branch $HEAD_REF"
git clone --depth 1 --branch "$HEAD_REF" "$url" ../ios-sdk-core
else
echo "ios-sdk-core: default branch"
git clone --depth 1 "$url" ../ios-sdk-core
fi
test -f ../ios-sdk-core/Package.swift

- name: Build
run: |
scheme=$(sed -n 's/^[[:space:]]*name: "\([^"]*\)".*/\1/p' Package.swift | head -1)
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let frameworkLibraryType: Product.Library.LibraryType? =
let usingLocalCore = FileManager.default.fileExists(atPath: "../ios-sdk-core/Package.swift")
let coreDependency: Package.Dependency = usingLocalCore
? .package(path: "../ios-sdk-core")
: .package(url: "https://github.com/MapConductor/ios-sdk-core", from: "1.1.4")
: .package(url: "https://github.com/MapConductor/ios-sdk-core", from: "1.4.0")

let package = Package(
name: "mapconductor-for-mapkit",
Expand Down
26 changes: 20 additions & 6 deletions Sources/MapConductorForMapKit/MapCameraPositionExtensions.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import Foundation
import MapKit
import MapConductorCore
@_spi(MapConductorDriver) import MapConductorCore

private let converter = MapKitZoomAltitudeConverter(zoom0Altitude: 171_319_879.0)
private let mapKitMaxPitch: Double = 80.9
private let mapConductorTileSizePoints: Double = 256.0
private let minCosLat: Double = 0.01
private let minCosTilt: Double = 0.05

/// MapKit(iOS)のカメラの縦の視野角(度)。
///
/// MapKit は値を公開していない。iPad Pro 11 で、傾けた地図の中心と北の地点の画面位置から
/// 焦点距離を求めて実測した値(tilt 30°)。
let mapKitVerticalFieldOfView: Double = 30.0

// Convert from MapCameraPosition to MKMapCamera
public extension MapCameraPosition {
/// Pass the target map view so the camera distance is derived from the view's actual
Expand All @@ -30,7 +36,7 @@ public extension MapCameraPosition {
? Spherical.computeOffset(
origin: position,
distance: distance * tan(pitchRadians),
heading: bearing
heading: CameraBearing.toNativeHeading(bearing)
)
: position

Expand All @@ -42,7 +48,7 @@ public extension MapCameraPosition {
),
fromDistance: distance,
pitch: nativePitch,
heading: bearing
heading: CameraBearing.toNativeHeading(bearing)
)
}
}
Expand All @@ -54,7 +60,11 @@ public extension MKMapView {
visibleRegion: VisibleRegion? = nil
) -> MapCameraPosition {
let cameraAltitude = camera.altitude
let pitchRadians = camera.pitch * .pi / 180.0
// `MKMapCamera.pitch` は CGFloat。CGFloat と Double の暗黙変換に任せると
// CoreGraphics の `cos(CGFloat)` と Foundation の `cos(Double)` が両方候補になり、
// ツールチェーンによっては `ambiguous use of 'cos'` で落ちる(CI の macos-15 で踏んだ)。
// 手元の Xcode では通ってしまうので、Double へ明示的に寄せておく。
let pitchRadians = Double(camera.pitch) * .pi / 180.0
// Recover the slant distance set via MKMapCamera(fromDistance:) — the inverse of toMKMapCamera().
let slantDistance = cameraAltitude / max(cos(pitchRadians), minCosTilt)
var position = GeoPoint(
Expand Down Expand Up @@ -95,7 +105,7 @@ public extension MKMapView {
return MapCameraPosition(
position: position,
zoom: zoom,
bearing: camera.heading,
bearing: CameraBearing.bearingFromNativeHeading(camera.heading),
tilt: logicalTilt,
visibleRegion: visibleRegion
)
Expand Down Expand Up @@ -154,7 +164,11 @@ private extension MKMapView {
/// from whatever camera happens to be set and reused to place the next one.
func metersPerPointPerDistance() -> Double? {
guard let metersPerPoint = measuredMetersPerPointAtCenter() else { return nil }
let pitchRadians = camera.pitch * .pi / 180.0
// `MKMapCamera.pitch` は CGFloat。CGFloat と Double の暗黙変換に任せると
// CoreGraphics の `cos(CGFloat)` と Foundation の `cos(Double)` が両方候補になり、
// ツールチェーンによっては `ambiguous use of 'cos'` で落ちる(CI の macos-15 で踏んだ)。
// 手元の Xcode では通ってしまうので、Double へ明示的に寄せておく。
let pitchRadians = Double(camera.pitch) * .pi / 180.0
let slantDistance = camera.altitude / max(cos(pitchRadians), minCosTilt)
guard slantDistance > 0 else { return nil }
let factor = metersPerPoint / slantDistance
Expand Down
Loading
Loading