Skip to content

Commit dc4358b

Browse files
natiginfogithub-actions[bot]
authored andcommitted
[maps-android] remove INDOOR_SELECTOR_PLUGIN from default plugin list (#9145)
GitOrigin-RevId: d62ac96f20bc2821d143a6dd35803b90e1f7f4f8
1 parent 9976d17 commit dc4358b

11 files changed

Lines changed: 21 additions & 383 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Mapbox welcomes participation and contributions from everyone.
1818
* Add `ModelLayer.modelAllowDensityReduction` property to disable density reduction in model layers.
1919
* Add Standard Style color and 3D configuration options: `colorBuildings`, `colorCommercial`, `colorEducation`, `colorIndustrial`, `colorLand`, `colorMedical`, `show3dBuildings`, `show3dFacades`, `show3dLandmarks`, and `show3dTrees`.
2020
* 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.
21-
* 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.
21+
* Introduce experimental indoor floor selector plugin. The plugin is not included in the default plugin list and must be explicitly added to `MapInitOptions.plugins`. It requires a style with indoor data and special access to indoor mapping features.
2222
* Add experimental `shadowDrawBeforeLayer` property to directional light to allow specifying the position in the layer stack for drawing shadows on the ground.
2323
* [tile_store] Add method to set tilestore path to be used by default.
2424
* Faster polygon triangulation for complex polygons.

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

Lines changed: 0 additions & 57 deletions
This file was deleted.

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

Lines changed: 0 additions & 67 deletions
This file was deleted.

app/src/main/res/layout/generated_test_indoorselector.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ 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),
7069
)
7170
}
7271
}

plugin-indoorselector/README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,33 @@
22

33
### Overview
44

5-
The Mapbox Maps Indoor Selector Plugin for Android is a public library for displaying an indoor floor selector on top of a MapView. By default, the plugin will show a floor selector on the top-right corner of the map when indoor map data is available. The selector displays available floors and allows users to navigate between them. The plugin automatically shows and hides based on whether indoor data is present in the current map view.
5+
The Mapbox Maps Indoor Selector Plugin for Android is a public library for displaying an indoor floor selector on top of a MapView. When enabled, the plugin will show a floor selector on the top-right corner of the map when indoor map data is available. The selector displays available floors and allows users to navigate between them. The plugin automatically shows and hides based on whether indoor data is present in the current map view.
66

77
A full overview of classes and interfaces can be found in our [API documentation](https://docs.mapbox.com/android/beta/maps/guides/).
88

99
### Getting Started
1010

1111
This README is intended for developers who are interested in [contributing](https://github.com/mapbox/mapbox-maps-android/blob/master/CONTRIBUTING.md) to the Mapbox Maps Indoor Selector Plugin for Android. Please visit [DEVELOPING.md](https://github.com/mapbox/mapbox-maps-android/blob/master/DEVELOPING.md) for general information and instructions on how to use the Mapbox Maps Plugin System. To add the indoor selector plugin to your project, you configure its dependency in your `build.gradle` files.
1212

13+
### Enabling the Plugin
14+
15+
⚠️ **Important**: The indoor selector plugin is **not included in the default plugin list**. You must explicitly add it when creating your MapView.
16+
17+
⚠️ **Known Issue - Native Memory Leak**: The indoor selector plugin currently registers a callback with `IndoorManager` that cannot be unregistered during the plugin lifecycle (see `IndoorSelectorPluginImpl.kt:138-140`). This callback remains active for the lifetime of the map instance, potentially causing native memory leaks. While the callback has an early-return guard when the plugin is disabled, it still incurs a small performance overhead on every indoor state update. A Flow-based implementation is planned to address this issue in a future release.
18+
19+
**Recommendation**: Only add this plugin to your application if you specifically need indoor mapping functionality and have access to indoor map data with a supported style.
20+
21+
```kotlin
22+
// In your Activity or Fragment
23+
val mapView = MapView(
24+
this,
25+
MapInitOptions(
26+
context = this,
27+
plugins = MapInitOptions.defaultPluginList + Plugin.Mapbox(Plugin.MAPBOX_INDOOR_SELECTOR_PLUGIN_ID)
28+
)
29+
)
30+
```
31+
1332
```groovy
1433
// In the root build.gradle file
1534
// The Mapbox access token needs to a scope set to DOWNLOADS:READ

plugin-indoorselector/src/main/java/com/mapbox/maps/plugin/indoorselector/IndoorSelectorPluginImpl.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import com.mapbox.maps.IndoorManager
1010
import com.mapbox.maps.IndoorState
1111
import com.mapbox.maps.MapboxExperimental
1212
import com.mapbox.maps.plugin.delegates.MapDelegateProvider
13-
import com.mapbox.maps.plugin.indoorselector.generated.IndoorSelectorAttributeParser
1413
import com.mapbox.maps.plugin.indoorselector.generated.IndoorSelectorSettings
1514
import com.mapbox.maps.plugin.indoorselector.generated.IndoorSelectorSettingsBase
1615
import java.util.concurrent.CopyOnWriteArraySet
@@ -90,8 +89,6 @@ internal class IndoorSelectorPluginImpl(
9089
* @return View that will be added to the MapView
9190
*/
9291
override fun bind(mapView: FrameLayout, attrs: AttributeSet?, pixelRatio: Float): View {
93-
internalSettings =
94-
IndoorSelectorAttributeParser.parseIndoorSelectorSettings(mapView.context, attrs, pixelRatio)
9592
return viewImplProvider(mapView.context).also {
9693
it.injectPresenter(this)
9794
}

plugin-indoorselector/src/main/java/com/mapbox/maps/plugin/indoorselector/generated/IndoorSelectorAttributeParser.kt

Lines changed: 0 additions & 38 deletions
This file was deleted.

plugin-indoorselector/src/main/res-public/values/public.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

plugin-indoorselector/src/main/res/values/attrs.xml

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)