Use scope in ol.source.GeoJSON

This commit is contained in:
Tom Payne
2013-11-07 12:39:06 +01:00
parent 82dc4baff6
commit 9bd9a1848e

View File

@@ -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);
}
};