UNPKG

wmts-to-mbtiles

Version:

Save tiles from WMTS service to MBTiles format

49 lines (38 loc) 860 B
<!DOCTYPE html> <html> <head> <title>wmts-to-mbtiles preview</title> <meta charset="utf-8" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.4.3/css/ol.css" type="text/css"> <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.4.3/build/ol.js"></script> <style> #map { display: block; width: 100%; height: 100vh; } </style> </head> <body> <div id='map'></div> <script> const map = new ol.Map({ target: 'map', layers: [ new ol.layer.Tile({ source: new ol.source.OSM() }), new ol.layer.Tile({ source: new ol.source.XYZ({ url: '/{z}/{x}/{y}' }), }) ], view: new ol.View({ center: [0, 0], zoom: 1, }) }) </script> </body> </html>