From 5b86e872461e8008217ac4774eff925e4f46a665 Mon Sep 17 00:00:00 2001 From: Paul Weidner Date: Wed, 28 Sep 2022 08:16:33 -0700 Subject: [PATCH] Use this.getFeatures() for consistency. #173 (#173) --- CHANGELOG.md | 1 + src/control/Edit/Edit.js | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44c4139..3888df3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Allow the public path to be set for Webpack chunk loading. #182 +- Use this.getFeatures() for consistency in edit control. #173 ## [v2.0.7] - 2022-09-22 diff --git a/src/control/Edit/Edit.js b/src/control/Edit/Edit.js index 2281984..89e1c9e 100644 --- a/src/control/Edit/Edit.js +++ b/src/control/Edit/Edit.js @@ -526,8 +526,7 @@ class Edit extends Control { * @api */ getGeoJSON() { - const features = this.layer.getSource().getFeatures(); - return new GeoJSON().writeFeatures(features, projection); + return new GeoJSON().writeFeatures(this.getFeatures(), projection); } /**