Class WebMercatorTileGrid
java.lang.Object
io.jmix.mapsflowui.kit.component.model.WmtsTileGrid
io.jmix.mapsflowui.kit.component.model.WebMercatorTileGrid
A
WmtsTileGrid preset for the standard Web Mercator (EPSG:3857) tile matrix set. The constructor
fills the inherited tile-grid geometry (resolutions, matrix identifiers, origin, extent) from a small set of
parameters, so a WMTS source can be configured without spelling out the full grid by hand.
The resolutions and matrixIds cover zoom levels 0–maxZoom (in OpenLayers
the array index must match the zoom level). matrixIds are matrixIdPrefix + z (e.g. prefix
"EPSG:900913:" yields "EPSG:900913:0"). Empty prefix yields bare "0","1",… as used
by OGC WebMercatorQuad.
For more details see: WMTSTileGrid docs
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleHalf of the Web Mercator world span in meters — the EPSG:3857 extent bound.Fields inherited from class io.jmix.mapsflowui.kit.component.model.WmtsTileGrid
extent, matrixIds, origin, origins, resolutions, sizes, tileSize, tileSizes -
Constructor Summary
ConstructorsConstructorDescriptionCreates a grid for zoom levels 0–19, 256px tiles and bare numeric matrix ids.WebMercatorTileGrid(int maxZoom) Creates a grid for zoom levels 0–maxZoom, 256px tiles and bare numeric matrix ids.WebMercatorTileGrid(Integer maxZoom, Size tileSize, String matrixIdPrefix) Creates a Web Mercator grid. -
Method Summary
Methods inherited from class io.jmix.mapsflowui.kit.component.model.WmtsTileGrid
getExtent, getMatrixIds, getOrigin, getOrigins, getResolutions, getSizes, getTileSize, getTileSizes, setExtent, setMatrixIds, setOrigin, setOrigins, setResolutions, setSizes, setTileSize, setTileSizes
-
Field Details
-
HALF_WORLD
public static final double HALF_WORLDHalf of the Web Mercator world span in meters — the EPSG:3857 extent bound.- See Also:
-
-
Constructor Details
-
WebMercatorTileGrid
public WebMercatorTileGrid()Creates a grid for zoom levels 0–19, 256px tiles and bare numeric matrix ids. -
WebMercatorTileGrid
public WebMercatorTileGrid(int maxZoom) Creates a grid for zoom levels 0–maxZoom, 256px tiles and bare numeric matrix ids.- Parameters:
maxZoom- the maximum zoom level (inclusive)
-
WebMercatorTileGrid
Creates a Web Mercator grid.- Parameters:
maxZoom- maximum zoom level (inclusive);nulldefaults to19tileSize- tile size in pixels;nulldefaults to256x256matrixIdPrefix- prefix prepended to each level index;nulldefaults to empty- Throws:
IllegalArgumentException- ifmaxZoom < 0
-