Skip to content
Select language:English

MDK 3.7.3

suspend fun requestRegion(southWest: Coord2D, northEast: Coord2D, fallback: Boolean = true): Region

Requests a region from the server.

This method retrieves the map data for a specific region defined by its bounding coordinates. It can optionally fall back to a locally cached version if the server is unreachable.

Return

The requested Region object.

Parameters

southWest

The southwest corner of the region.

northEast

The northeast corner of the region.

fallback

A boolean indicating whether to fall back to a locally cached version if the server is unreachable. Defaults to true.

Throws

MdkException.NotInitialized

If the GiPStech library is not initialized.

If another operation is in progress.

If the request is cancelled.


suspend fun requestRegion(swLongitude: Double, swLatitude: Double, neLongitude: Double, neLatitude: Double, fallback: Boolean = true): Region

Requests a region from the server.

This method retrieves the map data for a specific region defined by its bounding coordinates. It can optionally fall back to a locally cached version if the server is unreachable.

Return

The requested Region object.

Parameters

swLongitude

The minimum longitude of the region.

swLatitude

The minimum latitude of the region.

neLongitude

The maximum longitude of the region.

neLatitude

The maximum latitude of the region.

fallback

A boolean indicating whether to fall back to a locally cached version if the server is unreachable. Defaults to true.

Throws

MdkException.NotInitialized

If the GiPStech library is not initialized.

If another operation is in progress.

If the request is cancelled.