Convert WMTS examples to strapless template

This commit is contained in:
Tim Schaub
2015-11-17 10:02:10 -07:00
parent a94a00de1d
commit c463321643
10 changed files with 40 additions and 65 deletions

View File

@@ -2,7 +2,9 @@ goog.require('ol.format.WMTSCapabilities');
var parser = new ol.format.WMTSCapabilities();
$.ajax('data/WMTSCapabilities.xml').then(function(response) {
var result = parser.read(response);
$('#log').html(window.JSON.stringify(result, null, 2));
fetch('data/WMTSCapabilities.xml').then(function(response) {
return response.text();
}).then(function(text) {
var result = parser.read(text);
document.getElementById('log').innerText = JSON.stringify(result, null, 2);
});