Class OpenStreetMapMapnik
- java.lang.Object
-
- org.mapsforge.map.layer.download.tilesource.AbstractTileSource
-
- org.mapsforge.map.layer.download.tilesource.OpenStreetMapMapnik
-
- All Implemented Interfaces:
TileSource
public class OpenStreetMapMapnik extends AbstractTileSource
A tile source which fetches standard Mapnik tiles from OpenStreetMap. Layers using this tile source will enforce a time-to-live (TTL) of 8,279,000 milliseconds for cached tiles (unless the application explicitly sets a different TTL for that layer). The default TTL corresponds to the lifetime which the OSM server sets on a newly rendered tile. Refer toTileDownloadLayer
for details on the TTL mechanism. Requires a valid HTTP User-Agent identifying application: https://operations.osmfoundation.org/policies/tiles/
-
-
Field Summary
Fields Modifier and Type Field Description static OpenStreetMapMapnik
INSTANCE
-
Fields inherited from class org.mapsforge.map.layer.download.tilesource.AbstractTileSource
apiKey, authorization, defaultTimeToLive, followRedirects, hostNames, keyName, port, random, referer, timeoutConnect, timeoutRead, userAgent
-
-
Constructor Summary
Constructors Constructor Description OpenStreetMapMapnik(java.lang.String[] hostNames, int port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getParallelRequestsLimit()
java.net.URL
getTileUrl(org.mapsforge.core.model.Tile tile)
byte
getZoomLevelMax()
byte
getZoomLevelMin()
boolean
hasAlpha()
-
Methods inherited from class org.mapsforge.map.layer.download.tilesource.AbstractTileSource
equals, getApiKey, getAuthorization, getDefaultTimeToLive, getHostName, getKeyName, getReferer, getTimeoutConnect, getTimeoutRead, getUserAgent, hashCode, isFollowRedirects, setApiKey, setAuthorization, setFollowRedirects, setKeyName, setReferer, setTimeoutConnect, setTimeoutRead, setUserAgent
-
-
-
-
Field Detail
-
INSTANCE
public static final OpenStreetMapMapnik INSTANCE
-
-
Method Detail
-
getParallelRequestsLimit
public int getParallelRequestsLimit()
- Returns:
- the maximum number of parallel requests which this
TileSource
supports.
-
getTileUrl
public java.net.URL getTileUrl(org.mapsforge.core.model.Tile tile) throws java.net.MalformedURLException
- Returns:
- the download URL for the given
Tile
. - Throws:
java.net.MalformedURLException
-
getZoomLevelMax
public byte getZoomLevelMax()
- Returns:
- the maximum zoom level which this
TileSource
supports.
-
getZoomLevelMin
public byte getZoomLevelMin()
- Returns:
- the minimum zoom level which this
TileSource
supports.
-
hasAlpha
public boolean hasAlpha()
- Returns:
- the if the
TileSource
supports transparent images.
-
-