add champs-libres cyclosm tiles + a sandbox for implementing other tiles
This commit is contained in:
73
sandbox/wmts/index.html
Normal file
73
sandbox/wmts/index.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html style="height:100%;margin:0;padding:0;">
|
||||
<head>
|
||||
<title>Tests WMTS</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="./leaflet/leaflet.css" />
|
||||
<!-- <script src="./leaflet/Proj4Leaflet-1.0.1/lib/leaflet/leaflet.js"></script>
|
||||
<script src="./leaflet/Proj4Leaflet-1.0.1/lib/proj4.js"></script>
|
||||
<script src="./leaflet/Proj4Leaflet-1.0.1/src/proj4leaflet.js"></script> -->
|
||||
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
|
||||
<script src="./leaflet/leaflet-hash.js"></script>
|
||||
<!-- <script src="https://rawgithub.com/mylen/leaflet.TileLayer.WMTS/master/leaflet-tilelayer-wmts.js"></script> -->
|
||||
<style type="text/css">
|
||||
.leaflet-tile-container { pointer-events: auto; }
|
||||
</style>
|
||||
</head>
|
||||
<body style="height:100%;margin:0;padding:0;">
|
||||
<div id="map" style="height:100%"></div>
|
||||
<script>
|
||||
var map = L.map('map').setView([49.72, 5.57], 16);
|
||||
|
||||
var basemaps = {
|
||||
cyclosm: L.tileLayer('https://{s}.tiles.champs-libres.be/cyclosm/{z}/{x}/{y}.png', {
|
||||
subdomains: "abc",
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
maxZoom: 20
|
||||
}),
|
||||
|
||||
WMS: L.tileLayer.wms('https://geoservices.wallonie.be/arcgis/services/IMAGERIE/ORTHO_2019/MapServer/WMSServer?', {
|
||||
attribution: '© SPW',
|
||||
layers: '0',
|
||||
format: 'image/png',
|
||||
transparent: true,
|
||||
}),
|
||||
|
||||
//https://wxs.ign.fr/{apiKey}/geoportail/wmts?&REQUEST=GetTile&SERVICE=WMTS
|
||||
//&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg
|
||||
//&LAYER={layerName}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}",
|
||||
|
||||
|
||||
WMTS: L.tileLayer(
|
||||
'https://geoservices.wallonie.be/arcgis/rest/services/IMAGERIE/ORTHO_LAST/MapServer/WTMS?' +
|
||||
"&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0" +
|
||||
"&STYLE=default" +
|
||||
"&TILEMATRIXSET=default028mm" +
|
||||
"&FORMAT=image/jpeg"+
|
||||
"&LAYER=IMAGERIE_ORTHO_LAST"+
|
||||
"&TILEMATRIX={z}" +
|
||||
"&TILEROW={y}" +
|
||||
"&TILECOL={x}",
|
||||
{
|
||||
attribution: '© SPW',
|
||||
transparent: true,
|
||||
tileSize : 512
|
||||
})
|
||||
// WMTS: L.tileLayer(
|
||||
// 'http://geoservices.wallonie.be/arcgis/rest/services/IMAGERIE/ORTHO_2019/MapServer/tile/{z}/{x}/{y}', {
|
||||
// attribution: '© SPW',
|
||||
// transparent: true,
|
||||
// tileSize : 512
|
||||
// })
|
||||
}
|
||||
|
||||
|
||||
map.setView([50.5, 5.57], 10);
|
||||
|
||||
L.control.layers(basemaps).addTo(map);
|
||||
|
||||
var hash = L.hash(map);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user