leaflet 使用高德地图实例

时间:2024-01-29 15:14:11
let map = L.map("mapid", {
                      minZoom: 10,
                      maxZoom: 15,
                      center: [37.005646, 114.52044],
                      zoom: 11,
                      zoomDelta: 0.5,
                      fullscreenControl: false,
                      zoomControl: false,
                      attributionControl: false
                    });
            this.map = map;
            //http://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}//arcgis在线地图
            this.baseLayer=L.tileLayer("http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{
                    attribution: \'© 高德地图\',
                    maxZoom: 15,
                    minZoom: 10,
                    subdomains: "1234"
                });
            this.map.addLayer(this.baseLayer);