PSGA Scotland members: Please replace references on this page to the domain tile.viaeuropa.uk.com with tile.publicsectormapping.gov.scot
XYZ Tiles, also known as slippy map tiles, is a method of expressing map tile mosaics, indexed by (x,y) offsets and zoom levels (z). Unlike WMTS, there is no formal Get Capabilities request to obtain meta data about a tile service, although viaEuropa does support an extended version of TileJSON. Most applications have in-built knowledge of the mosaic and how to access the correct tile to fulfil a view. XYZ Tiles uses a REST interface where a request for a tile includes the desired map layer, x, y and z values as part of the URL. URLs are typically of the format. You must replace the parameters shown in {curly-brackets}.
https://tile.viaeuropa.uk.com/{id}/{map}/{z}/{x}/{y}.png
where:
{id} is your viaEuropa ID
{map} is the ID of the required map layer. e.g. m0100 (see Reference/Map Inventory)
{z} is the zoom level
{x} and {y} are the location offsets for the tile
Most tiles in viaEuropa are 256 x 256 pixels and stored in a PNG image format. Any exceptions to this will be documented in the Reference section under Map Inventory.
For example:
https://tile.viaeuropa.uk.com/xxxxx-xxxxx-xxxxx-xxxxx/m0100/9/295/99.png
with a valid viaEuropa ID would produce the following tile:
viaEuropa supports tile access using both http and https. When using https, http2 is supported which provides a number of service delivery optimisations.
The nature of tile-based access means that it is common for a browser to request a number of tiles to fill a required view. Unfortunately, even modern browsers limit the number of simultaneous requests that can be made to a single source. To circumvent this, viaEuropa uses a common method of supporting multiple subdomains. If applications are able to cycle their requests through the available sub-domains, this will have a notable performance improvement. The use of http2 bypasses the need for this workaround to large degree, but there are still some performance benefits related to application level load balancing.
The subdomains available are as follows:
a-tile.viaeuropa.uk.com
b-tile.viaeuropa.uk.com
c-tile.viaeuropa.uk.com
d-tile.viaeuropa.uk.com
TMS (Tiled Mapping Specification) is a specification for map tiles created by OSGeo (Open Source Geospatial Foundation). It is less popular than XYZ and has largely been replaced as a standard by OGC's WMTS.
The only different between XYZ and TMS is that the y-axis is flipped. You can therefore convert from XYZ to TMS (and back again) using the following generic code statement to flip the y coordinate.
y = (2^z) - y - 1
Please note that caching of tiles (beyond normal short-term caching by a web browser) is not permitted.