Files
openlayers/examples/wmts-capabilities.js
Frederic Junod 79c8afdba8 Simplify import path in examples
To have the same path (starting with `ol/`, without `.js`) as in the documentation.
The support was added in the webpack config in #8928
2018-11-26 17:18:52 +01:00

11 lines
330 B
JavaScript

import WMTSCapabilities from 'ol/format/WMTSCapabilities';
const parser = new WMTSCapabilities();
fetch('data/WMTSCapabilities.xml').then(function(response) {
return response.text();
}).then(function(text) {
const result = parser.read(text);
document.getElementById('log').innerText = JSON.stringify(result, null, 2);
});