Rename _ol_format_WMSCapabilities_ to WMSCapabilities
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
import _ol_format_WMSGetFeatureInfo_ from '../src/ol/format/WMSGetFeatureInfo.js';
|
||||
import 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 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 WMSGetFeatureInfo({
|
||||
layers: ['hotel']
|
||||
}).readFeatures(response);
|
||||
document.getElementById('hotel').innerText = hotelFeatures.length.toString();
|
||||
|
||||
var restaurantFeatures = new _ol_format_WMSGetFeatureInfo_({
|
||||
var restaurantFeatures = new WMSGetFeatureInfo({
|
||||
layers: ['restaurant']
|
||||
}).readFeatures(response);
|
||||
document.getElementById('restaurant').innerText = restaurantFeatures.length.toString();
|
||||
|
||||
Reference in New Issue
Block a user