GPVTileLayer - AppGeo/GPV GitHub Wiki
The GPVTileLayer specifies the characteristics of a single tiled image layer.
Columns
- TileLayerID - The unique ID of this tile layer in the GPV (not null).
- TileGroupID - The ID of the tile group containing this tile layer (not null). Links to GPVTileGroup.
- URL - A template of the URL for fetching tiles containing substitution characters (see below) for level, row and column (not null).
- MaxZoomLevel - The maximum zoom level supported by this tile layer. If null, defaults to 18.
- Attribution - A brief notice that appears at the bottom of the map when this tile layer is displayed. Can contain HTML to provide an external link.
- Overlay - Specifies whether this tile layer should draw over the graphics from the dynamic map service, 1 to draw over and 0 to draw under. If null, defaults to 0 (under). Use this to draw tile layers containing text, point symbols or semi-transparent polygon overlays.
- SequenceNo - A number specifying the display order of this tile layer in it's tile group (not null). Note that overlay tile layer always draw on top of all underlay tile layers and dynamic map layers.
- Active - Specifies whether this tile layer will be available for use, 1 for yes and 0 for no. If null, defaults to 0 (no).
URL Substitutions
The GPV will substitute particular character strings in the URL with data appropriate for the current tile. For example this URL configured for CARTO's gray-scale map:
http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png
will be converted to a URL like this for tile fetching:
http://c.basemaps.cartocdn.com/light_all/12/1238/1515.png
The following substitution strings are supported:
- {z} - zoom level number
- {y} - tile row number
- {x} - tile column number
- {s} - subdomain, ''a'', ''b'', or ''c'' on a rotating basis. Improves performance if available. Not all tiled image services support this.
- {minx} - minimum X coordinate for accessing dynamic, non-tiled map services
- {miny} - minimum Y coordinate for accessing dynamic, non-tiled map services
- {maxx} - maximum X coordinate for accessing dynamic, non-tiled map services
- {maxy} - maximum y coordinate for accessing dynamic, non-tiled map services
The first four substitutions are defined by the TileLayer object in Leaflet. Only the standard Web Mercator-based tiling scheme is supported.
Tiles from Dynamic Map Services
You can render tiles from dynamic map services, such as a WMS or the Esri REST API, using the minimum and maximum X and Y substitutions in the URL. Such tiles will likely draw more slowly than static tiles when first accessed because the map server must generate the tile images on demand. But once loaded in the browser they will act just like static tiles.
Labeling can be a problem on dynamically rendered tiles. The map service may attempt to fit labels within the small extent of the tile image. Labels for lines and polygons may be repeated from one tile to the next. In most cases labels will not cross tile edges. In some cases labels may be clipped at those edges. The map service is unaware of the tiling happening on the browser and sees each tile request as a unique map image. The resulting tiled map can look odd. You will probably want to obtain dynamic tiles from map services than have little or no labeling. Esri annotation features should draw correctly across tile edges.