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

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

Class responsible for cancelling the running operation it represents.

Functions

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

Provides list of categories of custom places.

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

Provides list of countries with installed offline places.

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

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

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

Loads Custom Place Categories from provided json string.

installOfflinePlaces
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.

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

Loads offline places from provided json string.

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

Set mode: ONLINE or OFFLINE.

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

Uninstalls offline places of the requested country.

updateInstalledPlaces
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.