-
- All Implemented Interfaces:
-
org.osmdroid.tileprovider.tilesource.ITileSource
public class MapBoxTileSource extends OnlineTileSourceBase
MapBox tile source, revised in 5.1 to not use static map ids or tokens
-
-
Field Summary
Fields Modifier and Type Field Description private StringmapBoxMapIdprivate StringaccessToken
-
Constructor Summary
Constructors Constructor Description MapBoxTileSource()Creates a MapBox TileSource. MapBoxTileSource(Context ctx)creates a new mapbox tile source, loading the access token and mapid from the manifest MapBoxTileSource(String mapboxid, String accesstoken)creates a new mapbox tile source, using the specified access token and mapbox id MapBoxTileSource(String name, int zoomMinLevel, int zoomMaxLevel, int tileSizePixels, String imageFilenameEnding)TileSource allowing majority of options (sans url) to be user selected. MapBoxTileSource(String name, int zoomMinLevel, int zoomMaxLevel, int tileSizePixels, String imageFilenameEnding, String mapBoxMapId, String mapBoxVersionBaseUrl)TileSource allowing all options to be user selected.
-
Method Summary
Modifier and Type Method Description StringgetMapBoxMapId()StringgetAccessToken()voidsetAccessToken(String accessTokeninput)final voidretrieveMapBoxMapId(Context aContext)Reads the mapbox map id from the manifest. final voidretrieveAccessToken(Context aContext)Reads the access token from the manifest. voidsetMapboxMapid(String key)StringgetTileURLString(long pMapTileIndex)voidenableHighDPI(boolean isHighDPI)-
Methods inherited from class org.osmdroid.tileprovider.tilesource.OnlineTileSourceBase
acquire, getBaseUrl, getTileSourcePolicy, release -
Methods inherited from class org.osmdroid.tileprovider.tilesource.BitmapTileSourceBase
getCopyrightNotice, getDrawable, getDrawable, getMaximumZoomLevel, getMinimumZoomLevel, getTileRelativeFilenameString, getTileSizePixels, imageFilenameEnding, name, ordinal, pathBase, toString -
Methods inherited from class org.osmdroid.tileprovider.tilesource.ITileSource
getDrawable, getDrawable -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
MapBoxTileSource
MapBoxTileSource()
Creates a MapBox TileSource.
-
MapBoxTileSource
MapBoxTileSource(Context ctx)
creates a new mapbox tile source, loading the access token and mapid from the manifest
-
MapBoxTileSource
MapBoxTileSource(String mapboxid, String accesstoken)
creates a new mapbox tile source, using the specified access token and mapbox id
-
MapBoxTileSource
MapBoxTileSource(String name, int zoomMinLevel, int zoomMaxLevel, int tileSizePixels, String imageFilenameEnding)
TileSource allowing majority of options (sans url) to be user selected.- Parameters:
name- NamezoomMinLevel- Minimum Zoom LevelzoomMaxLevel- Maximum Zoom LeveltileSizePixels- Size of Tile PixelsimageFilenameEnding- Image File Extension
-
MapBoxTileSource
MapBoxTileSource(String name, int zoomMinLevel, int zoomMaxLevel, int tileSizePixels, String imageFilenameEnding, String mapBoxMapId, String mapBoxVersionBaseUrl)
TileSource allowing all options to be user selected.- Parameters:
name- NamezoomMinLevel- Minimum Zoom LevelzoomMaxLevel- Maximum Zoom LeveltileSizePixels- Size of Tile PixelsimageFilenameEnding- Image File ExtensionmapBoxVersionBaseUrl- MapBox Version Base Url @see https://www.mapbox.
-
-
Method Detail
-
getMapBoxMapId
String getMapBoxMapId()
-
getAccessToken
String getAccessToken()
-
setAccessToken
void setAccessToken(String accessTokeninput)
-
retrieveMapBoxMapId
final void retrieveMapBoxMapId(Context aContext)
Reads the mapbox map id from the manifest.
-
retrieveAccessToken
final void retrieveAccessToken(Context aContext)
Reads the access token from the manifest.
-
setMapboxMapid
void setMapboxMapid(String key)
-
getTileURLString
String getTileURLString(long pMapTileIndex)
-
enableHighDPI
void enableHighDPI(boolean isHighDPI)
-
-
-
-