diff --git a/examples/vector-wfs.js b/examples/vector-wfs.js index 4604537bf9..3b3d9470b4 100644 --- a/examples/vector-wfs.js +++ b/examples/vector-wfs.js @@ -28,9 +28,12 @@ var vectorSource = new ol.source.Vector({ })) }); -// the global function whose name is specified in the URL of JSONP WFS -// GetFeature requests -var loadFeatures = function(response) { + +/** + * JSONP WFS callback function. + * @param {Object} response The response object. + */ +window.loadFeatures = function(response) { vectorSource.addFeatures(geojsonFormat.readFeatures(response)); };