Opened 16 years ago

Last modified 13 years ago

#8972 assigned New feature

Add ability to delete selected vector features within the Geodjango/OpenLayers Admin map interface

Reported by: springmeyer Owned by: jbronn
Component: GIS Version: 1.0
Severity: Normal Keywords: OpenLayers, admin, vector editing
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This feature has been needed for some time, and was recently requested. See: http://groups.google.com/group/django-users/browse_thread/thread/36242edfd0d0281c?hl=en

I've started a basic patch that adds a javascript function to allow multiple features to be selected in the map interface, deleted from view, and removed from the save method.

I've tested this so far when editing multipolygon data in the admin.

A known issue I'm hoping others may have a solution to:

Currently, an OL javascript error occurs on line 948 of OpenLayer.js after successfully deleting a feature. This do not seem to cause any problems in saving the correct geometry or in continuing to use the select control. This is the firebug output:

object is undefined
selectFeature()(undefined)OpenLayers.js (line 948)
clearSelectedFeatures()()277 (line 327)
javascript:geodjango_geometry.clearSelectedFeatures()()()javascri...eatures() (line 1)
[Break on this error] this.feature=null;this.dragControl.deact...ply(this.selectControl,[this.feature]);}

Attachments (2)

ol_admin_delete_selected.diff (2.2 KB ) - added by springmeyer 16 years ago.
Patch against SVN HEAD to allow the deletion of multiple features within the geodjango enabled admin interface
ol_admin_delete_selected.2.diff (2.1 KB ) - added by springmeyer 16 years ago.

Download all attachments as: .zip

Change History (11)

by springmeyer, 16 years ago

Patch against SVN HEAD to allow the deletion of multiple features within the geodjango enabled admin interface

by springmeyer, 16 years ago

comment:1 by jbronn, 16 years ago

Owner: changed from springmeyer to jbronn

comment:2 by springmeyer, 16 years ago

I've tested this patch more and put a bit more thought into this. I think that because the patch is not yet ready for two main reasons:

1) Multiple selection of features is desirable but tricky from a UI perspective and needs careful implementation so that the SelectFeature control and the ModifyFeature controls don't conflict. Current this patch only allows multi-select when the pan/hand tool is used and not the editing/modify tool.

2) This patch also needs more testing to ensure that the correct features are deleted from the selectedFeatures array and written into the id_geometry textarea to allow editing and drawing to continue without null value error in the main OL library.

So, I'll post another once I've had a chance to look into these issues in more detail.

comment:3 by (none), 15 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:4 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedAccepted

comment:5 by jbronn, 15 years ago

milestone: 1.1
Status: newassigned

comment:6 by jbronn, 15 years ago

milestone: 1.11.2

comment:7 by James Bennett, 14 years ago

milestone: 1.2

1.2 is feature-frozen, moving this feature request off the milestone.

comment:8 by Julien Phalip, 13 years ago

Easy pickings: unset
Needs tests: set
Severity: Normal
Type: New feature

comment:9 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

Note: See TracTickets for help on using tickets.
Back to Top