public class

CartoOnlineTileDataSource

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

Class Overview

An online tile data source that connects to Carto tile server.
This data source can be used with both vector and raster tiles,
depending on the specified source id.

Summary

Public Constructors
CartoOnlineTileDataSource(String source)
Constructs a CartoOnlineTileDataSource object.
Public Methods
synchronized void delete()
TileData loadTile(MapTile mapTile)
Loads the specified tile.
[Expand]
Inherited Methods
From class com.carto.datasources.TileDataSource
From class java.lang.Object

Public Constructors

public CartoOnlineTileDataSource (String source)

Constructs a CartoOnlineTileDataSource object.

Parameters
source Tile source id. For example "carto.streets".

Public Methods

public synchronized void delete ()

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.