基础底图
index.html
<!DOCTYPE html>
<html>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>地图 - 基础底图</title>
  <link rel="icon" href="/examples/static/resource/image/favicon.png" />
  <style type="text/css">
    html,body{margin:0px;height:100%;width:100%}
    .container{width:100%;height:100%}
  </style>
  <link rel="stylesheet" href="//rd.sz-map.com/libs/gm/gl/gl.min.css">
  <script type="text/javascript" src="//rd.sz-map.com/libs/gm/gl/gl.min.js"></script>
  <body>

    <div id="map" class="container"></div>

    <script>
      function initMap() {
        this.map = new GL.Map('map', {
          center: '120.650847,31.3092434',
          zoomControl: false,
          scaleControl: false
        });

        var tiles = [{"urlTemplate":"http://119.3.130.139/tiles/vector_pc/_alllayers","crs":{"resolutions":[0.0009765664903423653,0.0004882832451711827,0.00024414162258559134,0.00012207081129279567,0.00006103540564766688,0.000030517702822564394,0.000015258851412551242,0.000007629425705006574,0.000003814712853772333,0.00000190735154359766],"origin":"119.75,32.25"},"options":{"maxBounds":"119.89,30.75;121.406,32.08","preview":"/examples/static/images/preview.png"}},{"urlTemplate":"http://119.3.130.139/tiles/sz_sy","crs":{"origin":"119.75,32.25","resolutions":[0.0009765664903423653,0.0004882832451711827,0.00024414162258559134,0.00012207081129279567,0.00006103540564766688,0.000030517702822564394]},"options":{"maxBounds":"119.89,30.75;121.406,32.08","preview":"/examples/static/images/preview.png","format":"jpg"}}] || [];
        for (var i = 0; i < tiles.length; i++) {
          var tile = tiles[i];
          var baseLayer = GL.LayerLookup.createGaeaTiledLayer(
            tile.urlTemplate,
            tile.options,
            tile.crs
          );
          this.map.addBaseLayer(baseLayer);
        }
      }

      GL.init(initMap, '/examples/static/conf.json');

    </script>
  </body>
</html>
已复制!