diff --git a/examples/vector-wfs.js b/examples/vector-wfs.js index 7b9714098e..1ca1d6438a 100644 --- a/examples/vector-wfs.js +++ b/examples/vector-wfs.js @@ -10,10 +10,6 @@ goog.require('ol.style.Stroke'); goog.require('ol.style.Style'); goog.require('ol.tilegrid.XYZ'); -var loadFeatures = function(response) { - vectorSource.addFeatures(vectorSource.readFeatures(response)); -}; - var vectorSource = new ol.source.ServerVector({ format: new ol.format.GeoJSON(), loader: function(extent, resolution, projection) { @@ -32,6 +28,10 @@ var vectorSource = new ol.source.ServerVector({ projection: 'EPSG:3857' }); +var loadFeatures = function(response) { + vectorSource.addFeatures(vectorSource.readFeatures(response)); +}; + var vector = new ol.layer.Vector({ source: vectorSource, style: new ol.style.Style({