getViewport

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.

Return

Bounding box for current map viewport or null.