Cadaster WMS

Cercalia add a WMS Spain Cadaster

Cadaster WMS

main.js
var wmsServers = ["".concat(window.location.protocol, "//c1.cercalia.com/cgi-bin/mapserv?map=/usr/nexus/catastro/catastro.map"), "".concat(window.location.protocol, "//c2.cercalia.com/cgi-bin/mapserv?map=/usr/nexus/catastro/catastro.map"), "".concat(window.location.protocol, "//c4.cercalia.com/cgi-bin/mapserv?map=/usr/nexus/catastro/catastro.map"), "".concat(window.location.protocol, "//c6.cercalia.com/cgi-bin/mapserv?map=/usr/nexus/catastro/catastro.map")];
var map = new cercaliagl.Map({
  target: 'map',
  center: new cercaliagl.LonLat(2.157205, 41.401462),
  zoom: 15
});
map.whenReady(function () {
  var wmsLayer = new cercaliagl.layer.WMS({
    layerId: 'Catastro',
    tileSize: 256,
    url: wmsServers,
    params: {
      service: 'WMS',
      version: '1.1.1',
      request: 'GetMap',
      format: 'image/png',
      layers: 'default',
      srs: 'EPSG:3857',
      width: 256,
      height: 256,
      exceptions: 'application/vnd.ogc.se_inimage'
    }
  });
  map.addLayer(wmsLayer, 'road-label');
});
index.html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Cadaster WMS</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>