一,加载wmts服务
以下配置仅限于与天地图层级相同
//比例尺 const matrixIds = []; for (let i = 0; i < 20; ++i) { matrixIds[i] = { identifier: "" + (i + 1), // identifier: "" + (i + 1), topLeftCorner: new L.LatLng(90, -180) }; } Layer = new L.TileLayer.WMTS("https://mapservice.tdtah.cn/server1/rest/services"l, { layer:"DOM2015",//名称 style: "default",//样式 tilematrixSet: config.tilematrixSet, format: "image/png", matrixIds: "default", attribution: "4490", }).addTo(map);
天地图层级级别
二、WFS服务加载
此服务与wmts服务不同 ,返回的是没有样式的数据,类似于geojson数据,用get请求返回数据
url:https://mapservice.tdtah.cn/server1/services/rootline/MapServer/WFSServer 参数: { request:"GetFeature",//请求方式 service:"WFS",//服务形式 outputFormat:"GEOJSON",//返回数据格式 typeName:"rootline" }
查询方式具体参数可参考
https://mapservice.tdtah.cn/server1/rest/services/rootline/MapServer/0/query