Hwf 1 mese fa
parent
commit
e1669e4092
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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];