Package com.massifmaps.datasources
Class MapTilerOnlineTileDataSource
java.lang.Object
com.massifmaps.datasources.TileDataSource
com.massifmaps.datasources.MapTilerOnlineTileDataSource
An online tile data source that connects to MapTiler Cloud tile server.
This data source should be used with vector tiles,
though by customizing service URL could be used with raster tiles also.
Be sure to read the Terms and Conditions of your MapTiler service provider to see if the
service is available for your application.
Note: this class is experimental and may change or even be removed in future SDK versions.
This data source should be used with vector tiles,
though by customizing service URL could be used with raster tiles also.
Be sure to read the Terms and Conditions of your MapTiler service provider to see if the
service is available for your application.
Note: this class is experimental and may change or even be removed in future SDK versions.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a MapTilerOnlineTileDataSource object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the custom backend service URL.intReturns the current timeout value.Loads the specified tile.
Note: the tile coordinate system used here is vertically flipped relative to layer tile coordinate system.voidsetCustomServiceURL(String serviceURL) Sets the custom backend service URL.voidsetTimeout(int timeout) Sets the current timeout value.Methods inherited from class com.massifmaps.datasources.TileDataSource
buildTagValues, containsMetaDataKey, getContainerMetaData, getDataExtent, getMaxOverzoomLevel, getMaxZoom, getMaxZoomWithOverzoom, getMetaData, getMetaDataElement, getMinZoom, getProjection, isMaxOverzoomLevelSet, notifyTilesChanged, setMaxOverzoomLevel, setMetaData, setMetaDataElement
-
Constructor Details
-
MapTilerOnlineTileDataSource
Constructs a MapTilerOnlineTileDataSource object.- Parameters:
key- The access key (access token) to use registered with MapTiler.
-
-
Method Details
-
getCustomServiceURL
Returns the custom backend service URL.- Returns:
- The custom backend service URL. If this is not defined, an empty string is returned.
-
setCustomServiceURL
Sets the custom backend service URL.
The custom URL may contain tag "{key}" which will be substituted with the set access key.- Parameters:
serviceURL- The custom backend service URL to use. If this is empty, then the default service is used.
-
getTimeout
public int getTimeout()Returns the current timeout value.- Returns:
- The current timeout value in seconds. If negative, then default platform-specific timeout is used.
-
setTimeout
public void setTimeout(int timeout) Sets the current timeout value.- Parameters:
timeout- The new timeout value in seconds. If negative, then default platform-specific timeout is used.
-
loadTile
Description copied from class:TileDataSourceLoads the specified tile.
Note: the tile coordinate system used here is vertically flipped relative to layer tile coordinate system.- Overrides:
loadTilein classTileDataSource- Parameters:
mapTile- The tile to load.- Returns:
- The tile data. If the tile is not available, null may be returned.
-