WMTS Layer Service
In What Are Raster and Vector Data, two forms of data products are introduced. However, in practical application, due to the consideration of development convenience and front-end display performance, TerraQuanta does not recommend users to directly obtain raw data, and to use TerraQuanta’s standardized WMTS layer service instead. Here is a brief introduction to WMTS.
What is WMTS
OpenGIS Web Map Tile Service (WMTS) provides a standardized solution for publishing digital Map services using predefined map blocks. WMTS puts more data processing operations such as layer stacking on the client side to relieve the GIS server side data processing pressure and improve the user experience.
WMTS is an open standard map service docking format proposed by OGC (Open Geospatial Consortium), and is an improved version of WMS (Web Map Service). It makes up for the lack of block map provided by WMS, and, for that reason, more and more geographic information projects use WMTS service as the base map service. At Tianditu, for example, WMTS is used to provide mapping services.
Why does TerraQuanta recommend WMTS
The biggest advantage of WMTS is its faster and more efficient loading and rendering of map data
The tiles of WMTS are cacheable
WMTS supports network mechanisms such as distributed cache to achieve scalability and further improve load efficiency.
WMTS supports multiple coordinate systems and scale sets, improving service compatibility.
Regular WMTS usage tips
Map Tile Acquisition
- PNG format tiles
- Each zoom level is a directory, each column is a subdirectory, and each tile is a file
- The file named format each tile is /z(zoom level)/x/y.png. The client requests the tile by combining the domain name and file name
- Because the server has a limit on the number of connections to the client's IP, the map tile server usually provides several subdomains that the browser requests equally to bypass the IP limit
Map Tile Front End Display
- The display of map tiles on the client is the process of grid tiling and loading corresponding tiles
- First, in the HTML document, create a DIV that holds the map container. Set the center coordinate and zoom level of the map container, calculate the geographic space coverage according to the center coordinate, zoom level and the length and width of DIV, and then calculate how many tiles need to be loaded and which tiles need to be loaded
- Then, create some DOM (document object model) with the same size as the tiles in this DIV, calculate the corresponding relationship between DOM and map tiles according to the corresponding relationship between pixel coordinates and geographic coordinates, request the URL of the tiles, and load the tile image into DOM
- Finally, on the front end, map tiles can be rendered by DOM splicing
Using WMTS Service by TerraQuanta
TerraQuanta has prepared specific documents, click API Access Manual for details.