Invisible link to canonical for Microformats

Leaflet-providersESP


Plugin for Leaflet.js

Leaflet-providersESP is a plugin for Leaflet that contains configurations for various tile layers provided by public agencies in Spain.

DOI

Demo

Full docs and examples are available at https://dieghernan.github.io/leaflet-providersESP/.

This code generates a Leaflet map with a layer provided by Leaflet-providersESP.

<!DOCTYPE html>
<html>
  <head>
    <title>Minimal page | leaflet-providersESP</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <!-- Load Leaflet -->
    <link
      rel="stylesheet"
      href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
    />
    <script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
    <!-- Install leaflet-providersESP -->
    <script src="https://cdn.jsdelivr.net/gh/dieghernan/leaflet-providersESP/dist/leaflet-providersESP.min.js"></script>
    <!-- Display map full page -->
    <style>
      html {
        height: 100%;
      }
      body {
        height: 100%;
        margin: 0;
        padding: 0;
      }
      #mapid {
        height: 100%;
        width: 100%;
      }
    </style>
  </head>
  <body>
    <!-- Create map -->
    <div id="mapid"></div>
    <!-- Puerta del Sol - IDErioja server -->
    <script>
      var mymap = L.map("mapid").setView([40.4166, -3.70384], 18);
      L.tileLayer.providerESP("IDErioja").addTo(mymap);
    </script>
  </body>
</html>

All providers


You may also enjoy...