コンテンツにスキップ

モジュール概要

リポジトリは独立した Swift パッケージに分割されており、各アプリケーションは実際に使用するプロバイダーとユーティリティのみに依存できます。典型的なアプリは MapConductorCore と 1 つのプロバイダーモジュールに依存します。

パッケージリポジトリプロダクト主な型
ios-sdk-coreMapConductorCoreGeoPoint, GeoRectBounds, MapCameraPosition, Marker, Circle, Polyline, Polygon, GroundImage, InfoBubble, RasterLayer
ios-for-googlemapsMapConductorForGoogleMapsGoogleMapViewState, GoogleMapView, GoogleMapDesign
ios-for-mapboxMapConductorForMapboxMapboxViewState, MapboxMapView, MapboxMapDesign
ios-for-mapkitMapConductorForMapKitMapKitViewState, MapKitMapView, MapKitMapDesign
ios-for-maplibreMapConductorForMapLibreMapLibreViewState, MapLibreMapView, MapLibreDesign
ios-heatmapMapConductorHeatmapHeatmapOverlay, HeatmapOverlayState, HeatmapPointView, HeatmapPoints
ios-marker-clusterMapConductorMarkerClusterMarkerClusterGroup, MarkerClusterGroupState, MarkerClusterStrategy

ios-sdk-core にはプロバイダー非依存の型が含まれます:

  • ジオメトリ: GeoPoint, GeoRectBounds
  • カメラ: MapCameraPosition, MapPaddings, VisibleRegion
  • マップ状態プロトコル: MapViewStateProtocol
  • オーバーレイビュー: Marker, Polyline, Polygon, Circle, GroundImage, InfoBubble, RasterLayer
  • オーバーレイ状態: MarkerState, PolylineState, PolygonState, CircleState, GroundImageState
  • マーカーアイコン: DefaultMarkerIcon, ImageIcon, ImageDefaultIcon, BitmapIcon
  • ビルダーユーティリティ: MapViewContentBuilder, ForArray

すべてのプロバイダーパッケージは MapConductorCore を基盤としています。

プロバイダーパッケージはネイティブマップ SDK を通じて共通 API をレンダリングします。各プロバイダーモジュールは、SwiftUI マップビュー、具体的なマップビュー状態、プロバイダー固有のマップデザイン型、オーバーレイコントローラーバインディング、および getMapViewHolder() を通じた AnyMapViewHolder アクセスを提供します。

アプリがプロバイダーの切り替えをサポートする場合、複数のプロバイダーモジュールを追加することも有効です。共通のオーバーレイ宣言は共有できますが、プロバイダー状態とマップビューの型はプロバイダー固有のままです。

オプションパッケージは、それらの機能が必要な画面にのみ使用してください。コアオーバーレイと同じプロバイダーのマップコンテンツクロージャに統合されます。

  • MapConductorHeatmapHeatmapOverlayHeatmapPointViewHeatmapPointsHeatmapOverlayState を使ったタイルベースのヒートマップレンダリングを追加します。
  • MapConductorMarkerClusterMarkerClusterGroupMarkerClusterGroupStateMarkerClusterStrategy を使ったマーカークラスタリングを追加します。
dependencies: [
.package(url: "https://github.com/MapConductor/ios-sdk-core", from: "1.0.4"),
.package(url: "https://github.com/MapConductor/ios-for-googlemaps", from: "1.0.4"),
],
targets: [
.target(
name: "App",
dependencies: [
.product(name: "MapConductorCore", package: "ios-sdk-core"),
.product(name: "MapConductorForGoogleMaps", package: "ios-for-googlemaps"),
]
)
]

オプションモジュールを使ったサンプル

Section titled “オプションモジュールを使ったサンプル”
dependencies: [
.package(url: "https://github.com/MapConductor/ios-sdk-core", from: "1.0.4"),
.package(url: "https://github.com/MapConductor/ios-for-googlemaps", from: "1.0.4"),
.package(url: "https://github.com/MapConductor/ios-heatmap", from: "1.1.0"),
.package(url: "https://github.com/MapConductor/ios-marker-cluster", from: "1.0.1"),
],
targets: [
.target(
name: "App",
dependencies: [
.product(name: "MapConductorCore", package: "ios-sdk-core"),
.product(name: "MapConductorForGoogleMaps", package: "ios-for-googlemaps"),
.product(name: "MapConductorHeatmap", package: "ios-heatmap"),
.product(name: "MapConductorMarkerCluster", package: "ios-marker-cluster"),
]
)
]