public class

MapTilerOnlineTileDataSource

extends TileDataSource
java.lang.Object
   ↳ com.carto.datasources.TileDataSource
     ↳ com.carto.datasources.MapTilerOnlineTileDataSource

Class Overview

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.

Summary

Public Constructors
MapTilerOnlineTileDataSource(String key)
Constructs a MapTilerOnlineTileDataSource object.
Public Methods
synchronized void delete()
String getCustomServiceURL()
Returns the custom backend service URL.
TileData loadTile(MapTile mapTile)
Loads the specified tile.
void setCustomServiceURL(String serviceURL)
Sets the custom backend service URL.
[Expand]
Inherited Methods
From class com.carto.datasources.TileDataSource
From class java.lang.Object

Public Constructors

public MapTilerOnlineTileDataSource (String key)

Constructs a MapTilerOnlineTileDataSource object.

Parameters
key The access key (access token) to use registered with MapTiler.

Public Methods

public synchronized void delete ()

public String getCustomServiceURL ()

Returns the custom backend service URL.

Returns
  • The custom backend service URL. If this is not defined, an empty string is returned.

public TileData loadTile (MapTile mapTile)

Loads the specified tile.
Note: the tile coordinate system used here is vertically flipped relative to layer tile coordinate system.

Parameters
mapTile The tile to load.
Returns
  • The tile data. If the tile is not available, null may be returned.

public void setCustomServiceURL (String serviceURL)

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.