소스 검색

地图调整

Hwf 1 개월 전
부모
커밋
e1669e4092
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/utils/olMap/olMap.ts

+ 1 - 1
src/utils/olMap/olMap.ts

@@ -254,7 +254,7 @@ export class olMap {
   }
   formatXml(options) {
     const xml = new WMTSCapabilities();
-    return this.getCapabilities(options.code, options.layerType).then((res) => {
+    return this.getCapabilities(options.code ? options.code : options, options.layerType ? options.layerType : 'WMTS').then((res) => {
       if (options.layerType === 'WMTS') {
         const geoJson = xml.read(res.data);
         const data = geoJson.Contents.Layer[0];