> For the complete documentation index, see [llms.txt](https://docs.mapsindoors.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mapsindoors.com/other/map-design/using-a-custom-mapbox-mapstyle.md).

# Using a Custom Mapbox MapStyle

MapsIndoors as default uses a custom Mapbox MapStyle to access certain features on the Mapbox map.

You can create your own custom style in [Mapbox Studio](https://www.mapbox.com/mapbox-studio) and have MapsIndoors use that instead of the default used by MapsIndoors.

You will need to initialise Mapbox with your custom Mapbox MapStyle and disable the default MapsIndoors is using.

Below are examples of how to do that in the various SDKs.

### Web Javascript SDK

```javascript
const mapView = new mapsindoors.mapView.MapboxV3View({
   ...,
    style: "URI_TO_YOUR_CUSTOM_STYLE"
});
```

### Android SDK

{% hint style="warning" %}
This requires using Mapbox 11, i.e. you will need to use the MapsIndoors dependency `com.mapspeople.mapsindoors:mapbox-v11` in your `build.gradle` file.
{% endhint %}

```kotlin
mMap.loadStyle("URI_TO_YOUR_CUSTOM_STYLE")
val mapConfig = MPMapConfig.Builder(
    requireActivity(),
    mMap,
    mMapView,
    getString(R.string.mapbox_api_key),
    false
).build()
MapControl.create(mapConfig) {mc, error ->
    if (error != null) {
        // Handle error
    } else {
        mMapControl = mc
    }
}
```

### iOS SDK

{% hint style="warning" %}
This requires using Mapbox 11, i.e. you will need to use the Swift Package Manager distribution of the MapsIndoors iOS SDK or specify the `MapsIndoorsMapbox11` pod in your `Podfile`.
{% endhint %}

```swift
self.mapView.mapboxMap.loadStyle("URI_TO_YOUR_CUSTOM_STYLE") { _ in
    Task {
        do {
            try await MPMapsIndoors.shared.load(apiKey: "YOUR_API_KEY")
            let mapConfig = MPMapConfig(mapBoxView: self.mapView, accessToken: "1234")
            mapConfig.useMapsIndoorsStyle(value: false)
            self.mapControl = MPMapsIndoors.createMapControl(mapConfig: mapConfig)
        }
    }
}
```

### Flutter Plugin

```dart
mapController = MapsIndoorsWidget(
    useDefaultMapsIndoorsStyle: false,
    mapStyleUri: "URI_TO_YOUR_CUSTOM_STYLE",
)
```

### React Native Module

```javascript
const createMapControl = async () => {
   //Set useDefaultMapsIndoorsStyle to false when creating the MPMapConfig
   let config = new MPMapConfig({useDefaultMapsIndoorsStyle: false});
   const mc = await MapControl.create(config, NativeEventEmitter);
}

//Set the MapboxMapStyle when creating the view
<MapView
    style={{
        width: Dimensions.get('window').width,
        height: Dimensions.get('window').height
    }}
    mapboxMapStyle={'URI_TO_YOUR_CUSTOM_STYLE'}
/>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mapsindoors.com/other/map-design/using-a-custom-mapbox-mapstyle.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
