-
- All Implemented Interfaces:
-
org.osmdroid.tileprovider.tilesource.IStyledTileSource,org.osmdroid.tileprovider.tilesource.ITileSource
public class BingMapTileSource extends QuadTreeTileSource implements IStyledTileSource<String>
BingMap tile source used with OSMDroid
This class builds the Bing REST services url to be requested to get a tile image.
Before to be used, the static method retrieveBingKey must be invoked.
See http://msdn.microsoft.com/en-us/library/ff701721.aspxfor details on the Bing API.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringIMAGERYSET_AERIALpublic final static StringIMAGERYSET_AERIALWITHLABELSpublic final static StringIMAGERYSET_ROAD
-
Constructor Summary
Constructors Constructor Description BingMapTileSource(String aLocale)Constructor.
-
Method Summary
Modifier and Type Method Description static voidretrieveBingKey(Context aContext)Read the API key from the manifest. static StringgetBingKey()static voidsetBingKey(String key)StringgetBaseUrl()Get the base url, which will be a random one if there are more than one. StringgetTileURLString(long pMapTileIndex)intgetMinimumZoomLevel()get minimum zoom level intgetMaximumZoomLevel()get maximum zoom level intgetTileSizePixels()get tile size in pixel StringpathBase()get the base path used for caching purpose StringgetCopyrightNotice()Returns an I18N sensitive string representing the copy right notice (if any) of the tile source voidsetStyle(String pStyle)StringgetStyle()ImageryMetaDataResourceinitMetaData()Fire this after you've set up your prefered tile styles and localeif you forget, it should fire on the first request for tiles. -
Methods inherited from class org.osmdroid.tileprovider.tilesource.OnlineTileSourceBase
acquire, getTileSourcePolicy, release -
Methods inherited from class org.osmdroid.tileprovider.tilesource.BitmapTileSourceBase
getDrawable, getDrawable, getTileRelativeFilenameString, imageFilenameEnding, name, ordinal, toString -
Methods inherited from class org.osmdroid.tileprovider.tilesource.ITileSource
getDrawable, getDrawable -
Methods inherited from class org.osmdroid.tileprovider.tilesource.IStyledTileSource
getStyle, setStyle, setStyle -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BingMapTileSource
BingMapTileSource(String aLocale)
Constructor.- Parameters:
aLocale- The language used with BingMap REST service to retrieve tiles.
-
-
Method Detail
-
retrieveBingKey
static void retrieveBingKey(Context aContext)
Read the API key from the manifest.This method should be invoked before class instantiation.
-
getBingKey
static String getBingKey()
-
setBingKey
static void setBingKey(String key)
-
getBaseUrl
String getBaseUrl()
Get the base url, which will be a random one if there are more than one.Updated around 6.1.1, if base url list is null or empty, empty string is returned
-
getTileURLString
String getTileURLString(long pMapTileIndex)
-
getMinimumZoomLevel
int getMinimumZoomLevel()
get minimum zoom level
-
getMaximumZoomLevel
int getMaximumZoomLevel()
get maximum zoom level
-
getTileSizePixels
int getTileSizePixels()
get tile size in pixel
-
getCopyrightNotice
String getCopyrightNotice()
Returns an I18N sensitive string representing the copy right notice (if any) of the tile source
-
initMetaData
ImageryMetaDataResource initMetaData()
Fire this after you've set up your prefered tile styles and localeif you forget, it should fire on the first request for tiles.
See issue https://github.com/osmdroid/osmdroid/issues/383It was made public since v5.3
-
-
-
-