Merge pull request #9273 from chrismayer/9269-fix-gfi-examples

Fix WMS GetFeatureInfo examples
This commit is contained in:
Andreas Hocevar
2019-02-27 10:15:16 +01:00
committed by GitHub
2 changed files with 10 additions and 4 deletions
+5 -2
View File
@@ -33,8 +33,11 @@ map.on('singleclick', function(evt) {
evt.coordinate, viewResolution, 'EPSG:3857', evt.coordinate, viewResolution, 'EPSG:3857',
{'INFO_FORMAT': 'text/html'}); {'INFO_FORMAT': 'text/html'});
if (url) { if (url) {
document.getElementById('info').innerHTML = fetch(url)
'<iframe seamless src="' + url + '"></iframe>'; .then((response) => response.text())
.then((html) => {
document.getElementById('info').innerHTML = html;
});
} }
}); });
+5 -2
View File
@@ -33,8 +33,11 @@ map.on('singleclick', function(evt) {
evt.coordinate, viewResolution, 'EPSG:3857', evt.coordinate, viewResolution, 'EPSG:3857',
{'INFO_FORMAT': 'text/html'}); {'INFO_FORMAT': 'text/html'});
if (url) { if (url) {
document.getElementById('info').innerHTML = fetch(url)
'<iframe seamless src="' + url + '"></iframe>'; .then((response) => response.text())
.then((html) => {
document.getElementById('info').innerHTML = html;
});
} }
}); });