MapboxBuildingView

class MapboxBuildingView

Mapbox default view that adds/updates/removes building layer and building highlight for a specific feature geometry and applies appropriate properties to the building layer on top of MapboxMap using MapboxBuildingHighlightOptions

Each Layer added to the map by this class is a persistent layer - it will survive style changes. This means that if the data has not changed, it does not have to be manually redrawn after a style change. See Style.addPersistentStyleLayer.

Constructors

Link copied to clipboard
fun MapboxBuildingView()

Default MapboxBuildingView constructor

Functions

Link copied to clipboard
fun clear(style: Style)

Remove the building layer and source.

Link copied to clipboard
fun highlightBuilding(    style: Style,     buildings: List<QueriedRenderedFeature>,     options: MapboxBuildingHighlightOptions = MapboxBuildingHighlightOptions.Builder().build())

Highlight all buildings obtained by querying the MapboxMap. If the list of buildings is empty, none of them are highlighted.

Link copied to clipboard
fun removeBuildingHighlight(style: Style, options: MapboxBuildingHighlightOptions = MapboxBuildingHighlightOptions.Builder().build())

Remove building highlight from an already highlighted building