java.lang.Object | ||||
↳ | com.esri.android.map.Layer | |||
↳ | com.esri.android.map.TiledLayer | |||
↳ | com.esri.android.map.TiledServiceLayer | |||
↳ | com.esri.android.map.osm.OpenStreetMapLayer |
A tile service layer that supports OpenStreetMap (OSM) tile servers.
Default tile servers used are:
setKey(String)
can be used replace the placeholder with actual key at runtime. Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
double | XMAX | Maximum X coordinate in meters for the full extent. | |||||||||
double | XMIN | Minimum X coordinate in meters for the full extent. | |||||||||
double | YMAX | Maximum Y coordinate in meters for the full extent. | |||||||||
double | YMIN | Minimum Y coordinate in meters for the full extent. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.esri.android.map.TiledServiceLayer
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.esri.android.map.TiledServiceLayer
| |||||||||||
From class
com.esri.android.map.Layer
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
OpenStreetMapLayer()
Default constructor for
| |||||||||||
OpenStreetMapLayer(boolean initLayer)
The constructor for
| |||||||||||
OpenStreetMapLayer(String[] tileServerURLs, int minZoomLevel, int maxZoomLevel, String attributionText, boolean initLayer)
Constructs an instance of
OpenStreetMapLayer with specified tile servers. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getAttributionText()
Returns the attribution text.
| ||||||||||
int |
getMaxZoomLevel()
Returns the maximum zoom level.
| ||||||||||
int |
getMinZoomLevel()
Returns the minimum zoom level.
| ||||||||||
String[] |
getTileServerURLs()
The URLs used to fetch tiles from.
| ||||||||||
void |
setKey(String key)
Replaces the placeholder "{KEY}" in the tile server URLs.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
byte[] | getTile(int lev, int col, int row) | ||||||||||
void |
initLayer()
Initializes the layer.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.esri.android.map.TiledServiceLayer
| |||||||||||
From class
com.esri.android.map.TiledLayer
| |||||||||||
From class
com.esri.android.map.Layer
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.esri.android.map.popup.PopupLayer
|
Maximum X coordinate in meters for the full extent.
Minimum X coordinate in meters for the full extent.
Maximum Y coordinate in meters for the full extent.
Minimum Y coordinate in meters for the full extent.
Default constructor for
The constructor for
initLayer | true or false. The layer will be initialized if it is true. |
---|
Constructs an instance of OpenStreetMapLayer
with specified tile servers.
tileServerURLs | tile servers that follow OSM specification to fetch tiles from. |
---|---|
minZoomLevel | minimum zoom level |
maxZoomLevel | maximum zoom level |
attributionText | attribution to be used. |
initLayer | boolean, true to initialize the layer otherwise not. |
Returns the maximum zoom level.
Returns the minimum zoom level.
Replaces the placeholder "{KEY}" in the tile server URLs.
Example:
String tileServerURL = "http://a.tile.cloudmade.com/{KEY}/3/256/";
After setKey("081abc");
tileServerURL = "http://a.tile.cloudmade.com/081abc/3/256/";
key | key to be used. |
---|
Initializes the layer. The implementation should submit the OnStatusChangedListener.STATUS
event accordingly.