Transformed

This commit is contained in:
Tim Schaub
2017-12-11 16:29:33 -07:00
parent 1cdb6a66f0
commit 7f47883c48
737 changed files with 22216 additions and 21609 deletions
+4 -4
View File
@@ -1,21 +1,21 @@
goog.require('ol.format.WMSGetFeatureInfo');
import _ol_format_WMSGetFeatureInfo_ from '../src/ol/format/WMSGetFeatureInfo.js';
fetch('data/wmsgetfeatureinfo/osm-restaurant-hotel.xml').then(function(response) {
return response.text();
}).then(function(response) {
// this is the standard way to read the features
var allFeatures = new ol.format.WMSGetFeatureInfo().readFeatures(response);
var allFeatures = new _ol_format_WMSGetFeatureInfo_().readFeatures(response);
document.getElementById('all').innerText = allFeatures.length.toString();
// when specifying the 'layers' options, only the features of those
// layers are returned by the format
var hotelFeatures = new ol.format.WMSGetFeatureInfo({
var hotelFeatures = new _ol_format_WMSGetFeatureInfo_({
layers: ['hotel']
}).readFeatures(response);
document.getElementById('hotel').innerText = hotelFeatures.length.toString();
var restaurantFeatures = new ol.format.WMSGetFeatureInfo({
var restaurantFeatures = new _ol_format_WMSGetFeatureInfo_({
layers: ['restaurant']
}).readFeatures(response);
document.getElementById('restaurant').innerText = restaurantFeatures.length.toString();