Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
70b8541
TempSave
KouTsukigase Aug 2, 2025
77aa1ee
TempSave2
KouTsukigase Aug 4, 2025
19257b4
TempSave3
KouTsukigase Aug 4, 2025
5fe366c
WIP: In-progress implementation of GroundImage feature for HERE Map; …
KouTsukigase Aug 4, 2025
5a87a98
Resolve merge conflicts.
KouTsukigase Aug 4, 2025
81d8645
WIP: GroundImage bounds change detection in progress.
KouTsukigase Aug 5, 2025
1acf8a3
WIP: GroundImage rendered; modification handling not yet done.
KouTsukigase Aug 7, 2025
4d515a4
Add support for swapping GroundImage (Google Maps API GroundOverlay) …
KouTsukigase Aug 10, 2025
e255ab8
Impliment edit opacity slider'.
KouTsukigase Aug 11, 2025
49eacd2
Merge: the latest main branch into ground_overlay
wf9a5m75 Aug 14, 2025
1b1e051
update README.md
KouTsukigase Aug 14, 2025
69c9757
Changes groundImageState.opacity following the slider value
KouTsukigase Aug 14, 2025
2892c26
Merge branch 'main' into ground_overlay
wf9a5m75 Aug 15, 2025
24a5226
Initial implementation of GroundImage (GroundOverlay). NE and SW mark…
KouTsukigase Aug 17, 2025
2e47320
Resolve merge conflicts during rebase on ground_overlay.
KouTsukigase Aug 17, 2025
d705245
WIP: GroundImage feature implementation. Known issue: recomposition d…
KouTsukigase Aug 17, 2025
8b87864
Fix: GroundImage does not update by following markers
wf9a5m75 Aug 17, 2025
5ae8472
Fix: GeoRectBounds.extend is incorrect
wf9a5m75 Aug 17, 2025
82daee1
Update: Marker labels based on the relative positions
wf9a5m75 Aug 17, 2025
22fb300
Fix: ktLint errors
wf9a5m75 Aug 19, 2025
49dca64
Use LaunchedEffect instead of SideEffect
wf9a5m75 Aug 19, 2025
18e6d7f
Fix: crash the app on displaying maps (except Google Maps)
wf9a5m75 Aug 20, 2025
41443ce
Update: GroundImage is now selectable by controller
wf9a5m75 Aug 20, 2025
f53b03f
Rename: position property to clicked of GroundImageEvent class
wf9a5m75 Aug 20, 2025
dfed491
Remove generic type from GroundImageCapable
wf9a5m75 Aug 20, 2025
997a08c
Remove unused interface
wf9a5m75 Aug 20, 2025
2b0bd0e
Small refactoring
wf9a5m75 Aug 20, 2025
22bb16d
Refactor marker architecture to abstract pattern
wf9a5m75 Aug 21, 2025
98236cc
Merge main
wf9a5m75 Aug 21, 2025
3857074
Refactor polyline architecture to abstract controller pattern
wf9a5m75 Aug 21, 2025
806808e
Small refactoring
wf9a5m75 Aug 22, 2025
598f021
wip: refactoring for polygon
wf9a5m75 Aug 22, 2025
39e4875
wip: refactoring for polygon
wf9a5m75 Aug 22, 2025
62b7bbf
wip: implementing polygon
wf9a5m75 Aug 25, 2025
8b2932b
wip: PolygonController
wf9a5m75 Aug 28, 2025
4244ae1
wip: implementing PolygonOverlayManager for Mapbox
wf9a5m75 Aug 28, 2025
1e1afeb
wip: refactoring polygon
wf9a5m75 Aug 28, 2025
9404863
wip:reimplement Polygon for Mapbox
wf9a5m75 Aug 30, 2025
72b3076
wip: enhance polygon and circle UI with interactive controls
wf9a5m75 Aug 30, 2025
7344971
Fix: marker.icon.scale property does not work on ArcGIS and Google Ma…
wf9a5m75 Aug 31, 2025
cce97b7
Fix: KtLint errors
wf9a5m75 Aug 31, 2025
f8ed873
Fix: Polyline.strokeWidth is incorrect on Mapbox SDK
wf9a5m75 Aug 31, 2025
40f1445
create marker icon demo
wf9a5m75 Sep 1, 2025
3126467
fix: The polyline in the polyline example does not update when the ex…
wf9a5m75 Sep 2, 2025
9e38b1a
wip:fixing the flyTo demo
wf9a5m75 Sep 2, 2025
6a30a86
Fix: map.flyTo demo does not work
wf9a5m75 Sep 2, 2025
57fe4b4
Use Android-NDK27 for mapbox
wf9a5m75 Sep 2, 2025
b3ecfbb
Refactor overlay architecture to use unified overlay pattern
wf9a5m75 Sep 3, 2025
9b0a0b6
add: firebase app distribution dependencies
wf9a5m75 Sep 4, 2025
8143875
merge: main branch into ground_overlay branch
wf9a5m75 Sep 5, 2025
97a8b5e
Merge branch 'main' into ground_overlay
wf9a5m75 Sep 5, 2025
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
4 changes: 3 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"permissions": {
"allow": [
"Bash(./gradlew:*)"
"Bash(./gradlew:*)",
"Bash(grep:*)",
"Bash(rm:*)"
],
"deny": []
}
Expand Down
89 changes: 80 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,94 @@
# セットアップ
# MapConductor Android SDK

1. リポジトリをクローン
```
A unified mapping library that provides a common API for multiple map providers including Google Maps, Mapbox, HERE, and ArcGIS. Write once, deploy across all major mapping platforms.

## Features

- **🗺️ Multi-Provider Support**: Seamlessly switch between Google Maps, Mapbox, HERE, and ArcGIS with a single API
- **🎯 Unified Interface**: Common abstractions for markers, circles, polylines, polygons, and ground overlays
- **⚡ High Performance**: Spatial indexing with hexagonal cells for efficient marker clustering
- **🔄 Reactive State**: Built on Kotlin StateFlow for reactive UI updates
- **🎨 Jetpack Compose**: Modern Android UI toolkit integration

## Architecture

### Module Structure

- **`mapconductor-core`**: Core abstractions and shared functionality
- **`mapconductor-for-googlemaps`**: Google Maps implementation
- **`mapconductor-for-mapbox`**: Mapbox implementation
- **`mapconductor-for-here`**: HERE Maps implementation
- **`mapconductor-for-arcgis`**: ArcGIS implementation
- **`mapconductor-icons`**: Reusable marker icon components
- **`example-app`**: Comprehensive demo application

### Key Components

- **MapViewController**: Abstract controller interface for all map providers
- **MapViewBase**: Generic Compose-based map view component
- **Overlay Managers**: Separate managers for markers, circles, polylines, and polygons
- **Projection Utilities**: WebMercator and WGS84 coordinate transformations
- **HexGeocell**: Spatial indexing system for performance optimization

## Quick Start

### 1. Setup

Clone the repository:
```bash
git clone https://github.com/MapConductor/android-sdk.git
```

2. https://github.com/MapConductor/map-sdk-credentials/ から`secrets.properties` をプロジェクトルートに追加保存する
Add `secrets.properties` to the project root from https://github.com/MapConductor/map-sdk-credentials/

### 2. Basic Usage

```kotlin
@Composable
fun MyMapScreen() {
GoogleMapView(
modifier = Modifier.fillMaxSize(),
onMapReady = { controller ->
// Add markers, circles, polylines, etc.
}
) { mapState, controller ->
// Your map content here
}
}
```

### 3. Switch Map Providers

3. Android Studioでビルド
Simply change the map view component:
```kotlin
// Google Maps
GoogleMapView { /* ... */ }

# コーディングスタイル
// Mapbox
MapboxMapView { /* ... */ }

KtLintに従います。ローカルで実行する場合は、下記コマンドを実行します(可能ならば自動修正されます)。
// HERE Maps
HereMapView { /* ... */ }

// ArcGIS
ArcGISMapView { /* ... */ }
```

## Development

### Building
```bash
./gradlew build
```

### Code Style
This project follows KtLint conventions:
```bash
./gradlew allLintChecks
```

# 基本実装状況 (Android)

## Feature Implementation Status

| | Google Maps | Mapbox | Here | ArcGIS |
|-----------------|-------------|----------|----------|----------------|
Expand All @@ -26,6 +97,6 @@ KtLintに従います。ローカルで実行する場合は、下記コマン
| Circle | ☑ | ☑ | ☐ | ☐ (wip) |
| Polyline | ☑ | ☑ | ☑ | ☑ |
| Polygon | ☐ | ☐ | ☐ | ☐ |
| GroundOverlay | ☐ | ☐ | ☐ | ☐ |
| GroundImage | ☐ | N/A | N/A | N/A |
| RasterTileLayer | ☐ | ☐ | ☐ | ☐ |
| VectorTileLayer | ☐ | ☐ | ☐ | ☐ |
27 changes: 15 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
alias(libs.plugins.android.library) apply false
id("org.jlleitschuh.gradle.ktlint") version "13.0.0-rc.1"
alias(libs.plugins.jlleitschuh.ktlint) apply false
}

buildscript {
Expand All @@ -17,22 +17,25 @@ buildscript {
}
}

val modules: List<String> = rootDir.resolve("projects.properties").readLines()
.firstOrNull { it.startsWith("modules=") }
?.removePrefix("modules=")
?.split(",")
?.map { it.trim() }
?.filter { it.isNotEmpty() }
?: emptyList()
val modules: List<String> =
rootDir
.resolve("projects.properties")
.readLines()
.firstOrNull { it.startsWith("modules=") }
?.removePrefix("modules=")
?.split(",")
?.map { it.trim() }
?.filter { it.isNotEmpty() }
?: emptyList()

tasks.register("allLintChecks") {
group = "verification"
description = "Run ktlintFormat and lint for all modules"

val lintTasks = modules.map { module ->
listOf(":$module:ktlintFormat", ":$module:lint")
}
val lintTasks =
modules.map { module ->
listOf(":$module:ktlintFormat", ":$module:lint")
}

dependsOn(lintTasks)
}

2 changes: 2 additions & 0 deletions example-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ dependencies {
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
implementation(libs.androidx.appcompat)
implementation(platform(libs.firebase.bom))

// Google Maps SDK
implementation(libs.play.services.maps)
Expand All @@ -104,6 +105,7 @@ dependencies {
implementation(project(":mapconductor-for-mapbox"))
implementation(project(":mapconductor-for-arcgis"))
implementation(libs.androidx.vectordrawable)
implementation(libs.androidx.room.runtime.android)

testImplementation(libs.junit)
testImplementation(libs.androidx.core)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.core.content.ContextCompat
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.viewmodel.compose.viewModel
import com.mapconductor.example.navigation.NavigationViewModel
import com.mapconductor.example.pages.animation.AnimationMapPage
Expand All @@ -26,15 +28,30 @@ import com.mapconductor.example.pages.groundimage.GroundImageResources
import com.mapconductor.example.pages.map.flyto.FlyToMapIcons
import com.mapconductor.example.pages.map.flyto.FlyToMapPage
import com.mapconductor.example.pages.mapDesign.MapDesignMapPage
import com.mapconductor.example.pages.marker.MarkerBasicPage
import com.mapconductor.example.pages.polygon.PolygonMapPage
import com.mapconductor.example.pages.polyline.PolylineMapPage
import com.mapconductor.example.pages.stores.StoreMapPage
import com.mapconductor.example.ui.sidebar.Sidebar
import com.mapconductor.example.ui.sidebar.SidebarItem
import com.mapconductor.example.ui.theme.AppTheme

@Composable
fun DemoAppScreen() {
val navigationViewModel: NavigationViewModel = viewModel()
fun DemoAppScreen(initPage: String = "map") {
val navigationViewModel: NavigationViewModel =
viewModel<NavigationViewModel>(
factory =
object : ViewModelProvider.Factory {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
if (modelClass.isAssignableFrom(NavigationViewModel::class.java)) {
@Suppress("UNCHECKED_CAST")
return NavigationViewModel(initPage) as T
}
throw IllegalArgumentException("Unknown ViewModel class")
}
},
)

val currentPage by navigationViewModel.currentPage
val isSidebarExpanded by navigationViewModel.isSidebarExpanded
val context = LocalContext.current
Expand Down Expand Up @@ -65,6 +82,12 @@ fun DemoAppScreen() {
icon = Icons.Default.Home,
route = "map",
),
SidebarItem(
id = "marker-basic",
title = "Marker",
icon = Icons.Default.Home,
route = "marker-basic",
),
SidebarItem(
id = "flyTo",
title = "Move camera",
Expand All @@ -89,6 +112,12 @@ fun DemoAppScreen() {
icon = Icons.Default.PlayArrow,
route = "polyline",
),
SidebarItem(
id = "polygon",
title = "polygon ",
icon = Icons.Default.PlayArrow,
route = "polygon",
),
SidebarItem(
id = "animation",
title = "Animation ",
Expand Down Expand Up @@ -125,6 +154,11 @@ fun DemoAppScreen() {
onToggleSidebar = navigationViewModel::toggleSidebar,
)
}
"marker-basic" -> {
MarkerBasicPage(
onToggleSidebar = navigationViewModel::toggleSidebar,
)
}
"circle" -> {
CircleMapPage(
onToggleSidebar = navigationViewModel::toggleSidebar,
Expand All @@ -135,14 +169,14 @@ fun DemoAppScreen() {
onToggleSidebar = navigationViewModel::toggleSidebar,
)
}
"flyTo" -> {
FlyToMapPage(
icons = flyToMapPageIcons,
"polygon" -> {
PolygonMapPage(
onToggleSidebar = navigationViewModel::toggleSidebar,
)
}
"animation" -> {
AnimationMapPage(
"flyTo" -> {
FlyToMapPage(
icons = flyToMapPageIcons,
onToggleSidebar = navigationViewModel::toggleSidebar,
)
}
Expand All @@ -152,6 +186,11 @@ fun DemoAppScreen() {
onToggleSidebar = navigationViewModel::toggleSidebar,
)
}
"animation" -> {
AnimationMapPage(
onToggleSidebar = navigationViewModel::toggleSidebar,
)
}
"mapDesign" -> {
MapDesignMapPage(
onToggleSidebar = navigationViewModel::toggleSidebar,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class MainActivity : ComponentActivity() {
enableEdgeToEdge()

setContent {
DemoAppScreen()
DemoAppScreen(
initPage = "map",
)
}
}
}
Loading
Loading