queryBuildingToHighlight

fun queryBuildingToHighlight(point: Point, callback: MapboxNavigationConsumer<Expected<BuildingError, BuildingValue>>)

The API can be invoked to query a building on MapboxMap using the point provided as an input. The API returns a BuildingError if there is an internal issue fetching the buildings. Otherwise, it returns buildings wrapped inside BuildingValue in a form of list of QueriedFeature. This list is empty if the building is not found on the MapboxMap

Note:

There are two kind of points that can be used here to query a building.

  • A point you can obtain where the actual building is also known as location point

  • A point on a road snapped from the address also known as routable point

For this method to work, the point passed to this API should be a "location point" and not a "routing point".