public final class DemoTileSource

  1. Object
  2. DemoTileSource

ImplementsTileSource

A self-contained TileSource that synthesizes a deterministic Mapbox Vector Tile in memory for every address, with no network or bundled assets. Every tile carries the same recognizable content – a water body, a landuse area, two roads, a building and a labeled place – which makes it ideal for offline demos and for reproducible map screenshot tests.

Constructors

public DemoTileSource()

Methods

public boolean isVector()True for MVT vector tiles, false for raster image tiles.
public int getTileSize()The tile edge in pixels (almost always 256).
public int getMinZoom()The smallest zoom level this source serves.
public int getMaxZoom()The largest zoom level this source serves.
public String getAttribution()Attribution text that must be displayed over the map.
public void fetchTile(int z, int x, int y, TileCallback callback)Requests the tile at z/x/y, delivering the result to callback on the event dispatch thread.
public static byte[] buildTile() throws IOExceptionBuilds the synthetic MVT payload.

Inherited methods

Constructor details

DemoTileSource

public DemoTileSource()

Method details

isVector

public boolean isVector()
True for MVT vector tiles, false for raster image tiles.

getTileSize

public int getTileSize()
The tile edge in pixels (almost always 256).

getMinZoom

public int getMinZoom()
The smallest zoom level this source serves.

getMaxZoom

public int getMaxZoom()
The largest zoom level this source serves.

getAttribution

public String getAttribution()
Attribution text that must be displayed over the map.

fetchTile

public void fetchTile(int z, int x, int y, TileCallback callback)
Requests the tile at z/x/y, delivering the result to callback on the event dispatch thread.

buildTile

public static byte[] buildTile() throws IOException
Builds the synthetic MVT payload. Public and static so unit tests and the demo can reuse exactly the same bytes.