Inicio
Descripción
Ejemplos
Elementos del Paisaje
Actualizar mapa
<!DOCTYPE html> <html lang="es"> <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> <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], 16); L.tileLayer('https://tms-ign-base.idee.es/1.0.0/IGNBaseTodo/{z}/{x}/{-y}.jpeg', { maxZoom: 19, attribution: "
CC BY 4.0 scne.es
" }).addTo(map); var wmsUrl = 'https://wms.mapa.gob.es/sigpac/wms?' var basemaps = { Poligono: L.tileLayer.wms(wmsUrl, { layers: 'e_paisaje', format: 'image/png', transparent: true, version: '1.3.0', }), Linea: L.tileLayer.wms(wmsUrl, { layers: 'e_paisaje_linea', format: 'image/png', transparent: true, version: '1.3.0', }), Punto: L.tileLayer.wms(wmsUrl, { layers: 'e_paisaje_punto', format: 'image/png', transparent: true, version: '1.3.0', }) }; L.control.layers(basemaps, {}, {collapsed: false}).addTo(map); basemaps.Poligono.addTo(map); </script> </body> </html>