CustomPlacesManager

The class manages custom places: sets offline places or online places mode, installs and unistalls offline places. Online places are stored in online services and loaded when they are shown on a map view. Offline places are downloaded from online services and stored in a device in advance, so they can be shown also when a device is offline.

Types

Link copied to clipboard
enum CategoriesError : Enum<CustomPlacesManager.CategoriesError>
Link copied to clipboard
interface CategoriesListener
Link copied to clipboard
interface InstalledCountriesListener
Link copied to clipboard
data class InstallProgress(val loadedRecords: Int, val totalRecords: Int)
Link copied to clipboard
interface InstallProgressListener
Link copied to clipboard
enum InstallResult : Enum<CustomPlacesManager.InstallResult>
Link copied to clipboard
interface InstallResultListener
Link copied to clipboard
enum Mode : Enum<CustomPlacesManager.Mode>
Link copied to clipboard
class Task

Class responsible for cancelling the running operation it represents.

Functions

Link copied to clipboard
fun getCategories(listener: CustomPlacesManager.CategoriesListener, executor: Executor? = null)

Provides list of categories of custom places.

Link copied to clipboard
fun getInstalledCountries(listener: CustomPlacesManager.InstalledCountriesListener, executor: Executor? = null)

Provides list of countries with installed offline places.

Link copied to clipboard
fun getMode(): CustomPlacesManager.Mode

Get current mode: ONLINE or OFFLINE. Initialized to ONLINE mode.

Link copied to clipboard
fun installCategoriesFromJson(    jsonStream: String,     listener: CustomPlacesManager.InstallResultListener,     executor: Executor? = null)

Loads Custom Place Categories from provided json string.

Link copied to clipboard
fun installOfflinePlaces(    iso: String,     resultListener: CustomPlacesManager.InstallResultListener,     progressListener: CustomPlacesManager.InstallProgressListener? = null,     executor: Executor? = null): CustomPlacesManager.Task

Downloads and installs offline places of the requested country.

Link copied to clipboard
fun installOfflinePlacesFromJson(    jsonStream: String,     listener: CustomPlacesManager.InstallResultListener,     executor: Executor? = null)

Loads offline places from provided json string.

Link copied to clipboard
open override fun onContextDestroy()
Link copied to clipboard
fun setMode(mode: CustomPlacesManager.Mode)

Set mode: ONLINE or OFFLINE.

Link copied to clipboard
fun uninstallOfflinePlaces(    iso: String,     resultListener: CustomPlacesManager.InstallResultListener,     executor: Executor? = null)

Uninstalls offline places of the requested country.

Link copied to clipboard
fun updateInstalledPlaces(    resultListener: CustomPlacesManager.InstallResultListener,     progressListener: CustomPlacesManager.InstallProgressListener? = null,     executor: Executor? = null): CustomPlacesManager.Task

Downloads and installs updates for offline places of all installed countries.