SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="referrer" content="never">
  <title></title>
  

  <style>
    html,
    body {
      margin: 0;
      padding: 0;
      height: 100%;
    }

    .map {
      height: 100%;
    }
  </style>
</head>

<body>
  <div id="map" class="map"></div>
  <script>
    // 地图参数
    const mapOptions = {
      "center": [105.080, 36.042],// 地图中心点
      // "maxExtent": {
      //   "xmin": 74,
      //   "ymin": 18,
      //   "xmax": 141,
      //   "ymax": 45
      // }, // 地图范围
      // "spatialReference": {
      //   "projection": "EPSG:3857"// 地图类型,可选值:'EPSG:3857'|'baidu' 高德、谷歌地图用此选项|百度地图
      // },
      "maxZoom": 8,
      "minZoom": 3,
      "zoom": 3,
    }
    // 初始化地图
    let map = new simplegis.MapX("map", mapOptions)
    // 底图参数
    const baseLayerOptions = {
      "urlTemplate": "https://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
    }
    // 初始化底图
    let baseLayer = new simplegis.TileLayerX("gaodemap", baseLayerOptions)
    // 加载底图
    map.setBaseLayer(baseLayer)
  </script>
</body>

</html>