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.
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)
}
}
}
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'}
/>