|
@@ -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];
|