
public class BingMapTileSource extends QuadTreeTileSource implements IStyledTileSource<String>
This class builds the Bing REST services url to be requested to get a tile image.
Before to be used, the static method retrieveBingKey(android.content.Context) must be invoked.
See http://msdn.microsoft.com/en-us/library/ff701721.aspx for details on the Bing API.
BitmapTileSourceBase.LowMemoryException| Modifier and Type | Field and Description |
|---|---|
static String |
IMAGERYSET_AERIAL
Aerial imagery mode
|
static String |
IMAGERYSET_AERIALWITHLABELS
Aerial imagery with road overlay mode
|
static String |
IMAGERYSET_ROAD
Roads imagery mode
|
mCopyright, mImageFilenameEnding, mName, random| Constructor and Description |
|---|
BingMapTileSource(String aLocale)
Constructor.
Warning, the static method retrieveBingKey(android.content.Context) should have been invoked once before constructor invocation |
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseUrl()
Get the base url, which will be a random one if there are more than one.
|
static String |
getBingKey() |
String |
getCopyrightNotice()
Returns an I18N sensitive string representing the copy right notice (if any) of the tile source
|
int |
getMaximumZoomLevel()
get maximum zoom level
|
int |
getMinimumZoomLevel()
get minimum zoom level
|
String |
getStyle() |
int |
getTileSizePixels()
get tile size in pixel
|
String |
getTileURLString(long pMapTileIndex) |
ImageryMetaDataResource |
initMetaData()
Fire this after you've set up your prefered tile styles and locale
if you forget, it should fire on the first request for tiles.
|
String |
pathBase()
get the base path used for caching purpose
|
static void |
retrieveBingKey(Context aContext)
Read the API key from the manifest.
This method should be invoked before class instantiation. |
static void |
setBingKey(String key) |
void |
setStyle(String pStyle) |
protected void |
updateBaseUrl()
Resolves url patterns to update urls with current map view mode and available sub domain.
When several subdomains are available, change current sub domain in a cycle manner |
quadTreeacquire, getTileSourcePolicy, releasegetDrawable, getDrawable, getTileRelativeFilenameString, imageFilenameEnding, name, ordinal, toStringpublic static final String IMAGERYSET_AERIAL
public static final String IMAGERYSET_AERIALWITHLABELS
public static final String IMAGERYSET_ROAD
public BingMapTileSource(String aLocale)
retrieveBingKey(android.content.Context) should have been invoked once before constructor invocationaLocale - The language used with BingMap REST service to retrieve tiles.public static void retrieveBingKey(Context aContext)
public static String getBingKey()
public static void setBingKey(String key)
public String getBaseUrl()
OnlineTileSourceBasegetBaseUrl in class OnlineTileSourceBasepublic String getTileURLString(long pMapTileIndex)
getTileURLString in class QuadTreeTileSourcepublic int getMinimumZoomLevel()
getMinimumZoomLevel in interface ITileSourcegetMinimumZoomLevel in class BitmapTileSourceBasepublic int getMaximumZoomLevel()
getMaximumZoomLevel in interface ITileSourcegetMaximumZoomLevel in class BitmapTileSourceBasepublic int getTileSizePixels()
getTileSizePixels in interface ITileSourcegetTileSizePixels in class BitmapTileSourceBasepublic String pathBase()
pathBase in class BitmapTileSourceBasepublic String getCopyrightNotice()
ITileSourcegetCopyrightNotice in interface ITileSourcegetCopyrightNotice in class BitmapTileSourceBasepublic void setStyle(String pStyle)
setStyle in interface IStyledTileSource<String>public String getStyle()
getStyle in interface IStyledTileSource<String>public ImageryMetaDataResource initMetaData()
See issue https://github.com/osmdroid/osmdroid/issues/383 It was made public since v5.3
protected void updateBaseUrl()