Cercalia add a new base layer Mapa topográfico IGN

Cercalia add a new base layer Mapa topográfico IGN

Layer IGN

main.js
const layerId = 'IGN';
const xyzLayer = new cercaliagl.layer.XYZ({
  layerId,
  label: 'IGN',
  url: 'https://www.ign.es/wmts/mapa-raster?' + 'layer=MTN&' + 'style=default&' + 'tilematrixset=GoogleMapsCompatible&' + 'Service=WMTS&' + 'Request=GetTile&Version=1.0.0&' + 'Format=image%2Fjpeg&' + 'TileMatrix={z}&' + 'TileCol={x}&' + 'TileRow={y}',
  attribution: '<a style="color:#666;" href="http://www.scne.es" target="_blank">BTN25 2014-2015 CC-BY 4.0 <b>ign.es</b></a>'
});
const map = new cercaliagl.Map({
  customBaseLayers: [xyzLayer],
  defaultBaseLayer: layerId,
  target: 'map'
});
index.html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Cercalia add a new base layer Mapa topográfico IGN</title>
    <style>
      .map {
        width: 100%;
        height: 640px;
      }
    </style>
  </head>
  <body>
    <div id="map" class="map"></div>

    <link rel="stylesheet" type="text/css" href="//maps.cercalia.com/gl/v1.0/cercaliagl.css">
    <script src="//maps.cercalia.com/gl/v1.0/cercaliagl.js?key=YOUR_API_KEY"></script>
    <script src="main.js"></script>
  </body>
</html>