public class

BitmapOverlayRasterTileDataSource

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

Class Overview

Tile data source that uses given bitmap with two, three or four control points define a raster overlay.
Note: if two points are given, conformal transformation is calculated. If three points are given, affine transformation is calculated. In case of four points, perspective transformation is used.

Summary

Public Constructors
BitmapOverlayRasterTileDataSource(int minZoom, int maxZoom, Bitmap bitmap, Projection projection, MapPosVector mapPoses, ScreenPosVector bitmapPoses)
Constructs a new bitmap overlay data source.
Public Methods
synchronized void delete()
MapBounds getDataExtent()
Returns the extent of the tiles in this data source.
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 BitmapOverlayRasterTileDataSource (int minZoom, int maxZoom, Bitmap bitmap, Projection projection, MapPosVector mapPoses, ScreenPosVector bitmapPoses)

Constructs a new bitmap overlay data source.

Parameters
minZoom The minimum zoom for generated tiles.
maxZoom The maximum zoom for generated tiles.
bitmap The bitmap to use as an overlay.
projection The projection definining coordinate system of the control points.
mapPoses The geographical control points. The list must contain either 2, 3 or 4 points.
bitmapPoses The pixel coordinates in the bitmap corresponding to geographical control points. The number of coordinates must be equal to the number of control points in mapPoses list.
Throws
IllegalArgumentException If the transformation can not be calculated.

Public Methods

public synchronized void delete ()

public MapBounds getDataExtent ()

Returns the extent of the tiles in this data source.
The bounds are in coordinate system of the projection of the data source.

Returns
  • The extent of the data source.

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.