java.lang.Object | ||
↳ | com.carto.packagemanager.PackageManager | |
↳ | com.carto.packagemanager.CartoPackageManager |
Offline map package manager that uses Carto online service for map package downloads.
After packages are downloaded, they can be used offline without any connection to the server.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CartoPackageManager(String source, String dataFolder)
Constructs a CartoPackageManager object, given application context and data folder.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized void | delete() | ||||||||||
AssetPackage |
getStyleAssetPackage(CartoBaseMapStyle style)
Returns the specified style asset package.
| ||||||||||
boolean |
startStyleDownload(CartoBaseMapStyle style)
Starts updating the specified map style asynchronously.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructs a CartoPackageManager object, given application context and data folder.
The data folder must exist before creating a new package manager and it is assumed to be persistent.
Note: the package manager must be explicitly started using start() method!
source | Name of the package source. The official source is "carto.streets". |
---|---|
dataFolder | The folder where downloaded packages are kept. It must exist and must be writable. |
Exception | If package manager fails to open or create package database. |
---|---|
IOException |
Returns the specified style asset package.
style | The style of the asset package to return. |
---|
Starts updating the specified map style asynchronously. When this task finishes, listener is called.