Inicio
Descripción
Ejemplos
Recinto pbf
Actualizar mapa
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Documento HTML</title> <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/> <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script> <script src="https://unpkg.com/leaflet.vectorgrid@latest/dist/Leaflet.VectorGrid.js"></script> <style> html, body { margin: 0; padding: 0; height: 100%; } .map { width: 100%; height: 100%; } </style> </head> <body> <div id="map" class="map"></div> <script> var map = L.map('map').setView([40.02, -4.9], 14); L.tileLayer('https://tms-ign-base.idee.es/1.0.0/IGNBaseTodo/{z}/{x}/{-y}.jpeg', { maxZoom: 17, attribution: "
CC BY 4.0 scne.es
" }).addTo(map); var layerUrl = "https://sigpac-hubcloud.es/mvt/recinto@3857@pbf/{z}/{x}/{y}.pbf"; var opciones = { minNativeZoom: 12, maxNativeZoom: 15 }; var vectorTileLayer = L.vectorGrid.protobuf(layerUrl, opciones).addTo(map); </script> </body> </html>