ViewportProvider

fun fun interface ViewportProvider

Provides map viewport, if you have map in your application.

Functions

getViewport
Link copied to clipboard
abstract fun getViewport(): BoundingBox?
This method will be called in the following cases:
  1. Search engine requests the map's viewport visible to a user. Provided viewport will be used as a bounding box for upcoming search request, if SearchOptions.boundingBox or CategorySearchOptions.boundingBox aren't specified.

  2. com.mapbox.search.analytics.AnalyticsService requests the map's viewport visible to a user. Provided viewport will be used for better and more accurate analytics data.