public class LayerDownloader
extends android.content.BroadcastReceiver
Modifier and Type | Class and Description |
---|---|
static interface |
LayerDownloader.Callback |
static class |
LayerDownloader.DownloadStatus |
static class |
LayerDownloader.JobStatus |
Constructor and Description |
---|
LayerDownloader(MapView mapView) |
Modifier and Type | Method and Description |
---|---|
int |
calculateTileCount()
Calculate the number of tiles that will be downloaded
|
void |
dispose()
Dispose the downloader by resetting the shape and unregistering receiver
|
GeoBounds |
getBounds()
Get the download bounds
|
GeoPoint |
getLowerRight()
Get the lower-right bounds point
|
GeoPoint[] |
getPoints()
Get the list of points that determine which tiles to download
|
GeoPoint |
getUpperLeft()
Get the upper-left bounds point
|
void |
onReceive(android.content.Context context,
android.content.Intent intent) |
void |
reset()
Reset the download shape
|
void |
setCacheURI(java.lang.String uri)
Set the URI of the tile cache
|
void |
setCallback(LayerDownloader.Callback callback)
Set the event callback for the downloader
|
void |
setExpandDistance(double dist)
Set the distance to expand the download area (for open polylines)
|
void |
setResolution(double minRes,
double maxRes)
Set the resolution range to download
|
void |
setShape(Shape shape)
Set the download shape
|
void |
setSourceURI(java.lang.String uri)
Set the map layer source URI
|
void |
setTitle(java.lang.String title)
Set the title of the layer download
|
boolean |
startDownload()
Start the download service for a tile set
The shape, title, and source URI must be set prior to calling this
|
void |
stopDownload()
Stop any active downloads
|
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public LayerDownloader(MapView mapView)
public void dispose()
public void setTitle(java.lang.String title)
title
- Title stringpublic void setShape(Shape shape)
shape
- Shapepublic void setExpandDistance(double dist)
dist
- Distance in meterspublic void setResolution(double minRes, double maxRes)
minRes
- Minimum map resolutionmaxRes
- Maximum map resolutionpublic void setCacheURI(java.lang.String uri)
uri
- Cache URIpublic void setSourceURI(java.lang.String uri)
uri
- Source URIpublic void setCallback(LayerDownloader.Callback callback)
callback
- Callbackpublic boolean startDownload()
public void stopDownload()
public void reset()
public int calculateTileCount()
public GeoBounds getBounds()
public GeoPoint getUpperLeft()
public GeoPoint getLowerRight()
public GeoPoint[] getPoints()
public void onReceive(android.content.Context context, android.content.Intent intent)
onReceive
in class android.content.BroadcastReceiver