Class WebMercatorTileGrid

java.lang.Object
io.jmix.mapsflowui.kit.component.model.WmtsTileGrid
io.jmix.mapsflowui.kit.component.model.WebMercatorTileGrid

public class WebMercatorTileGrid extends WmtsTileGrid
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 Details

    • HALF_WORLD

      public static final double HALF_WORLD
      Half 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

      public WebMercatorTileGrid(Integer maxZoom, Size tileSize, String matrixIdPrefix)
      Creates a Web Mercator grid.
      Parameters:
      maxZoom - maximum zoom level (inclusive); null defaults to 19
      tileSize - tile size in pixels; null defaults to 256x256
      matrixIdPrefix - prefix prepended to each level index; null defaults to empty
      Throws:
      IllegalArgumentException - if maxZoom < 0