Skip to content

Instantly share code, notes, and snippets.

@oscarfonts
Last active December 4, 2017 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oscarfonts/f9a98f33f856cc5d0595a4051c956a8b to your computer and use it in GitHub Desktop.
Save oscarfonts/f9a98f33f856cc5d0595a4051c956a8b to your computer and use it in GitHub Desktop.
Ejemplo TMS en Leaflet
license: mit
<!DOCTYPE html>
<html>
<head>
<title>Ejemplo TMS en Leaflet</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css" type="text/css">
<style type="text/css">
html, body, #map {
margin: 0;
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"></script>
<script>
var map = L.map('map', {
center: [39.476, -6.372],
zoom: 16,
layers: [
new L.TileLayer('{url}/1.0.0/{layer}@{matrixSet}@{format}/{z}/{x}/{-y}.{format}', {
url: 'https://ide.caceres.es/geoserver/gwc/service/tms',
layer: 'callejero:Callejero_Caceres',
matrixSet: 'EPSG:900913',
format: 'png8'
})
]
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment