TileSystem
TileSystem is a tile-system utility class that describes the tile X/Y axis index direction and the world projection origin. It does not extend any base class. It is used by TileLayer or GroupTileLayer through options.tileSystem, where you can pass a built-in preset name or a [sx, sy, ox, oy] tuple.
js
import { TileSystem } from "maptalks";
const ts = new TileSystem([1, -1, -20037508.34, 20037508.34]);Constructor
js
new TileSystem(sx, sy, ox, oy)
new TileSystem([sx, sy, ox, oy])Parameters:
sxNumber|Number[]X-axis tile index direction (1 means right is larger, -1 the reverse); when an array is passed it is[sx, sy, ox, oy].syNumberY-axis tile index direction (1 means bottom is larger, -1 the reverse).oxNumberx of the world's projected coordinate system origin.oyNumbery of the world's projected coordinate system origin.
Static Methods
TileSystem.getDefault(projection): string | number[]— return the default tile system code for a projection
Built-in presets:
| Constant | Meaning |
|---|---|
web-mercator | Web Mercator (google/bing/AMap) |
tms-global-mercator | TMS / mapbox mbtiles (EPSG:3857) |
global-geodetic | EPSG:4326 global geodetic grid |
tms-global-geodetic | TMS / OSGEO (EPSG:4326) |
baidu | Baidu Maps |