Skip to content

Commit

Permalink
Merge pull request #93 from Nanguage/add-vector-api
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway authored Apr 21, 2024
2 parents 7965da2 + d444a62 commit 3b20963
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/layers/VectorLayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,18 @@ export default {
decimals: config.decimals
});
return routeFeatures;
}
},
get_selected_features(config) {
config = config || {};
if (config.decimals === undefined) config.decimals = 2;
const selectedFeatures = me.select.getFeatures().array_;
const format = new GeoJSON();
const routeFeatures = format.writeFeaturesObject(selectedFeatures, {
decimals: config.decimals
});
return routeFeatures;
},
};
},
clearFeatures() {
Expand Down

0 comments on commit 3b20963

Please sign in to comment.