Skip to content

Commit 59c16e8

Browse files
natiginfogithub-actions[bot]
authored andcommitted
[maps-android] Indoor Selector UI implementation (#8749)
GitOrigin-RevId: 6f6f39819c55f3fcb6847f76998d1af699d55668
1 parent bd09e1a commit 59c16e8

File tree

40 files changed

+1898
-68
lines changed

40 files changed

+1898
-68
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Mapbox welcomes participation and contributions from everyone.
1313
## Features ✨ and improvements 🏁
1414
* Add Standard Style color and 3D configuration options: `colorBuildings`, `colorCommercial`, `colorEducation`, `colorIndustrial`, `colorLand`, `colorMedical`, `show3dBuildings`, `show3dFacades`, `show3dLandmarks`, and `show3dTrees`.
1515
* Introduce experimental `AttributionControl` composable function that exposes `AttributionState` programmatically, enabling developers to build custom Attribution UI outside of the map while maintaining compliance with [Mapbox ToS](https://www.mapbox.com/legal/tos) requirements.
16+
* Introduce experimental indoor floor selector plugin. The plugin is disabled by default and requires a style with indoor data and special access to indoor mapping features.
1617
* Add `shadowDrawBeforeLayer` property to directional light to allow specifying the position in the layer stack for drawing shadows on the ground.
1718

1819
# 11.17.1 December 11, 2025

app/src/androidTest/java/com/mapbox/maps/testapp/indoorselector/generated/IndoorSelectorAttributeParserDefaultValueTest.kt

Lines changed: 57 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/androidTest/java/com/mapbox/maps/testapp/indoorselector/generated/IndoorSelectorAttributeParserTest.kt

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/com/mapbox/maps/testapp/examples/IndoorExampleActivity.kt

Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- This file is generated. -->
3+
<com.mapbox.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
5+
android:id="@+id/mapView"
6+
mapbox:mapbox_indoorSelectorEnabled = "false"
7+
mapbox:mapbox_indoorSelectorGravity = "bottom|end"
8+
mapbox:mapbox_indoorSelectorMarginLeft = "10dp"
9+
mapbox:mapbox_indoorSelectorMarginTop = "10dp"
10+
mapbox:mapbox_indoorSelectorMarginRight = "10dp"
11+
mapbox:mapbox_indoorSelectorMarginBottom = "10dp"
12+
android:layout_width="match_parent"
13+
android:layout_height="match_parent" />
14+
<!-- End of generated file. -->

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ apiValidation {
113113
"com.mapbox.maps.plugin.attribution.BuildConfig",
114114
"com.mapbox.maps.plugin.compass.BuildConfig",
115115
"com.mapbox.maps.plugin.gestures.BuildConfig",
116+
"com.mapbox.maps.plugin.indoorselector.BuildConfig",
116117
"com.mapbox.maps.plugin.lifecycle.BuildConfig",
117118
"com.mapbox.maps.plugin.locationcomponent.BuildConfig",
118119
"com.mapbox.maps.plugin.logo.BuildConfig",

maps-sdk/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ dependencies {
103103
api(project(":extension-localization"))
104104
api(project(":plugin-lifecycle"))
105105
api(project(":plugin-viewport"))
106+
api(project(":plugin-indoorselector"))
106107
compileOnly(libs.asyncInflater)
107108
api(libs.kotlin)
108109
api(libs.coroutines)

maps-sdk/src/main/java/com/mapbox/maps/MapController.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import com.mapbox.maps.plugin.Plugin.Companion.MAPBOX_ATTRIBUTION_PLUGIN_ID
1414
import com.mapbox.maps.plugin.Plugin.Companion.MAPBOX_CAMERA_PLUGIN_ID
1515
import com.mapbox.maps.plugin.Plugin.Companion.MAPBOX_COMPASS_PLUGIN_ID
1616
import com.mapbox.maps.plugin.Plugin.Companion.MAPBOX_GESTURES_PLUGIN_ID
17+
import com.mapbox.maps.plugin.Plugin.Companion.MAPBOX_INDOOR_SELECTOR_PLUGIN_ID
1718
import com.mapbox.maps.plugin.Plugin.Companion.MAPBOX_LIFECYCLE_PLUGIN_ID
1819
import com.mapbox.maps.plugin.Plugin.Companion.MAPBOX_LOCATION_COMPONENT_PLUGIN_ID
1920
import com.mapbox.maps.plugin.Plugin.Companion.MAPBOX_LOGO_PLUGIN_ID
@@ -28,6 +29,7 @@ import com.mapbox.maps.plugin.compass.createCompassPlugin
2829
import com.mapbox.maps.plugin.delegates.MapPluginProviderDelegate
2930
import com.mapbox.maps.plugin.gestures.GesturesPlugin
3031
import com.mapbox.maps.plugin.gestures.createGesturePlugin
32+
import com.mapbox.maps.plugin.indoorselector.createIndoorSelectorPlugin
3133
import com.mapbox.maps.plugin.lifecycle.createLifecyclePlugin
3234
import com.mapbox.maps.plugin.locationcomponent.createLocationComponentPlugin
3335
import com.mapbox.maps.plugin.logo.createLogoPlugin
@@ -376,6 +378,9 @@ internal class MapController : MapPluginProviderDelegate, MapControllable {
376378
MAPBOX_VIEWPORT_PLUGIN_ID -> {
377379
createViewportPlugin()
378380
}
381+
MAPBOX_INDOOR_SELECTOR_PLUGIN_ID -> {
382+
createIndoorSelectorPlugin()
383+
}
379384
else -> {
380385
plugin.instance
381386
?: throw MapboxConfigurationException("Custom non Mapbox plugins must have non-null `instance` parameter!")

maps-sdk/src/main/java/com/mapbox/maps/MapInitOptions.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ data class MapInitOptions @JvmOverloads constructor(
6666
Plugin.Mapbox(Plugin.MAPBOX_LIFECYCLE_PLUGIN_ID),
6767
Plugin.Mapbox(Plugin.MAPBOX_MAP_OVERLAY_PLUGIN_ID),
6868
Plugin.Mapbox(Plugin.MAPBOX_VIEWPORT_PLUGIN_ID),
69+
Plugin.Mapbox(Plugin.MAPBOX_INDOOR_SELECTOR_PLUGIN_ID),
6970
)
7071
}
7172
}

maps-sdk/src/main/java/com/mapbox/maps/plugin/MapDelegateProviderImpl.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.mapbox.maps.plugin
22

33
import androidx.annotation.RestrictTo
4+
import com.mapbox.maps.IndoorManager
45
import com.mapbox.maps.MapController
56
import com.mapbox.maps.MapboxExperimental
67
import com.mapbox.maps.MapboxMap
@@ -43,4 +44,6 @@ internal class MapDelegateProviderImpl(
4344

4445
override val mapStyleManagerDelegate: MapboxStyleManager = mapboxMap
4546
override val mapInteractionDelegate: MapInteractionDelegate = mapboxMap
47+
@OptIn(com.mapbox.annotation.MapboxExperimental::class)
48+
override val indoorManager: IndoorManager = mapboxMap.indoor
4649
}

0 commit comments

Comments
 (0)