AbstractTileFactory, EmptyTileFactorypublic abstract class TileFactory extends Object
| 限定符 | 构造器 | 说明 |
|---|---|---|
protected |
TileFactory(TileFactoryInfo info) |
Creates a new instance of TileFactory
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
Point2D |
geoToPixel(GeoPosition c,
int zoomLevel) |
Convert a GeoPosition to a pixel position in the world bitmap
a the specified zoom level.
|
TileFactoryInfo |
getInfo() |
Get the TileFactoryInfo describing this TileFactory
|
Dimension |
getMapSize(int zoom) |
Returns a Dimension containing the width and height of the map,
in tiles at the
current zoom level.
|
abstract Tile |
getTile(int x,
int y,
int zoom) |
Return the Tile at a given TilePoint and zoom level
|
int |
getTileSize(int zoom) |
Gets the size of an edge of a tile in pixels at the current zoom level.
|
abstract void |
load(Tile tile) |
|
GeoPosition |
pixelToGeo(Point2D pixelCoordinate,
int zoom) |
Convert a pixel in the world bitmap at the specified
zoom level into a GeoPosition
|
protected abstract void |
startLoading(Tile tile) |
Override this method to load the tile using, for example, an
ExecutorService. |
protected TileFactory(TileFactoryInfo info)
info - a TileFactoryInfo to configure this TileFactorypublic int getTileSize(int zoom)
zoom - the current zoom levelpublic Dimension getMapSize(int zoom)
zoom - the current zoom levelpublic abstract Tile getTile(int x, int y, int zoom)
x - X indexy - Y indexzoom - the current zoom levelpublic abstract void load(Tile tile)
public GeoPosition pixelToGeo(Point2D pixelCoordinate, int zoom)
pixelCoordinate - a Point2D representing a pixel in the world bitmapzoom - the zoom level of the world bitmappublic Point2D geoToPixel(GeoPosition c, int zoomLevel)
c - a GeoPositionzoomLevel - the zoom level to extract the pixel coordinate forpublic TileFactoryInfo getInfo()
protected abstract void startLoading(Tile tile)
ExecutorService.tile - The tile to load.Copyright © 2019. All rights reserved.