diff --git a/examples/getfeatureinfo-layers.html b/examples/getfeatureinfo-layers.html
index c8445a413a..8c48c294ae 100644
--- a/examples/getfeatureinfo-layers.html
+++ b/examples/getfeatureinfo-layers.html
@@ -9,8 +9,6 @@ docs: >
`ol.format.WMSGetFeatureInfo` format object, which allows features returned
by a single WMS GetFeatureInfo request that asks for more than one layer
to be read by layer name.
-resources:
- - https://code.jquery.com/jquery-1.11.2.min.js
---
diff --git a/examples/getfeatureinfo-layers.js b/examples/getfeatureinfo-layers.js
index d6e06664b6..ffe9240adc 100644
--- a/examples/getfeatureinfo-layers.js
+++ b/examples/getfeatureinfo-layers.js
@@ -1,24 +1,23 @@
goog.require('ol.format.WMSGetFeatureInfo');
-$.ajax({
- url: './data/wmsgetfeatureinfo/osm-restaurant-hotel.xml',
- success: function(response) {
+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);
- $('#all').html(allFeatures.length.toString());
+ // this is the standard way to read the features
+ 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({
- layers: ['hotel']
- }).readFeatures(response);
- $('#hotel').html(hotelFeatures.length.toString());
+ // when specifying the 'layers' options, only the features of those
+ // layers are returned by the format
+ var hotelFeatures = new ol.format.WMSGetFeatureInfo({
+ layers: ['hotel']
+ }).readFeatures(response);
+ document.getElementById('hotel').innerText = hotelFeatures.length.toString();
- var restaurantFeatures = new ol.format.WMSGetFeatureInfo({
- layers: ['restaurant']
- }).readFeatures(response);
- $('#restaurant').html(restaurantFeatures.length.toString());
+ var restaurantFeatures = new ol.format.WMSGetFeatureInfo({
+ layers: ['restaurant']
+ }).readFeatures(response);
+ document.getElementById('restaurant').innerText = restaurantFeatures.length.toString();
- }
});