From 9bd9a1848e364120a43c8438cfb443822ad3bd8d Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 7 Nov 2013 12:39:06 +0100 Subject: [PATCH] Use scope in ol.source.GeoJSON --- src/ol/source/geojsonsource.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ol/source/geojsonsource.js b/src/ol/source/geojsonsource.js index 2cd8dbc7fc..51aff5b1ab 100644 --- a/src/ol/source/geojsonsource.js +++ b/src/ol/source/geojsonsource.js @@ -27,12 +27,11 @@ ol.source.GeoJSON = function(opt_options) { projection: projection }); - var addFeature = goog.bind(this.addFeature, this); if (goog.isDef(options.geoJSON)) { - ol.reader.GeoJSON.readObject(options.geoJSON, addFeature); + ol.reader.GeoJSON.readObject(options.geoJSON, this.addFeature, this); } if (goog.isDef(options.string)) { - ol.reader.GeoJSON.readString(options.string, addFeature); + ol.reader.GeoJSON.readString(options.string, this.addFeature, this); } };