Skip to content
Snippets Groups Projects
Commit 6e3ca1c7 authored by Camille Blanchon's avatar Camille Blanchon
Browse files

Merge branch 'redmine-issues/19720' into 'develop'

REDMINE_ISSUE-19720 | Amélioration du bouton de suppression sur la carte

See merge request !790
parents 77d72793 60e3e36d
No related branches found
No related tags found
1 merge request!790REDMINE_ISSUE-19720 | Amélioration du bouton de suppression sur la carte
......@@ -193,8 +193,6 @@ const editionService = {
* It assumes that there is only one feature present in the source.
*/
removeFeatureFromMap() {
// Reset all other tools to ensure only the delete feature functionality is active
this.resetAllTools();
// Access the source where the features are stored
const source = this.drawSource; // Replace with the correct reference to your OpenLayers source
// Get all features from the source
......@@ -202,6 +200,8 @@ const editionService = {
// Check if there is a feature to delete
if (features.length > 0 && confirm('Etes-vous sur de vouloir supprimer cet objet ?')) {
try {
// Reset all other tools to ensure only the delete feature functionality is active
this.resetAllTools();
// Remove the feature from the source
const featureToRemove = features[0];
source.removeFeature(featureToRemove);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment