How do I remove road names?

Road names dynamically appear on the Mapbox base map depending on the "Transition Level", which controls at which zoom level some Mapbox elements are hidden from the map (e.g. 3D buildings and road names). Read more about "Transition Level" in this Help Center article and in our documentation.

If you want to completely remove road names from your MapsIndoors map when using Mapbox, follow the below instructions:

Wek SDK:

// When initializing the MapboxV3View
const mapViewOptions = {
  accessToken: 'YOUR_MAPBOX_ACCESS_TOKEN',
  element: document.getElementById('map'),
  center: { lat: 38.8974905, lng: -77.0362723 },
  zoom: 17,
  maxZoom: 22,
  showRoadNames: false // Set this parameter to false
};

const mapViewInstance = new mapsindoors.mapView.MapboxV3View(mapViewOptions);
const mapsIndoorsInstance = new mapsindoors.MapsIndoors({mapView: mapViewInstance});

Map Template:

You can also set this parameter via URL when using the Map Template: showRoadNames=false. Read more about URL parameters here.

Swift (iOS):

let mapConfig = MPMapConfig(mapBoxView: mapView, accessToken: "mapBoxApiKey")
mapConfig.setShowRoadLabels(show: false)
let mapControl = MPMapsIndoors.createMapControl(mapConfig: mapConfig)

Last updated

Was this helpful?