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) {
   formatXml(options) {
     const xml = new WMTSCapabilities();
     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') {
       if (options.layerType === 'WMTS') {
         const geoJson = xml.read(res.data);
         const geoJson = xml.read(res.data);
         const data = geoJson.Contents.Layer[0];
         const data = geoJson.Contents.Layer[0];