slotName

Determines the position of the route layers in the map style. Adding a slot to the style can be done at runtime with code like:

style.addPersistentLayer(slotLayer("runtimeSlotId") {
slot("middle")
})

The slot layer needs to be added persistently, because so are the route line layers, and they require the slot reference immediately on style reload to be correctly recreated.

See maps SDK for more information. https://docs.mapbox.com/style-spec/reference/slots https://docs.mapbox.com/help/tutorials/aa-standard-in-studio/#place-layer-in-a-slot

Parameters

name

the name of the slot to use for the route line