ICGC - ESRI -Contextmaps

Veure codi font pantalla completa



      <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
        <title>ICGC - ESRI -Contextmaps</title>
        <link rel="stylesheet" href="https://js.arcgis.com/3.35/esri/css/esri.css">
        <style>
          html, 
          body, 
          #map {
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
          }
       
        </style>
        <script src="https://js.arcgis.com/3.35/"></script>
        <script>
          require([
            "esri/map",
            "esri/layers/VectorTileLayer",
            "dojo/domReady!"
          ], function(Map, VectorTileLayer) {
            var map = new Map("map", {
              center: [2.8508, 41.8567], // longitude, latitude
              zoom: 7
            });
           var vtlayer = new VectorTileLayer("https://geoserveis.icgc.cat/contextmaps/icgc.json");
           map.addLayer(vtlayer);
          });
        </script>
      </head>
      <body>
        <div id="map"></div>
      </body>
      </html>