Opened 16 years ago
Last modified 14 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)
Change History (11)
by , 16 years ago
Attachment: | ol_admin_delete_selected.diff added |
---|
by , 16 years ago
Attachment: | ol_admin_delete_selected.2.diff added |
---|
comment:1 by , 16 years ago
Owner: | changed from | to
---|
comment:2 by , 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:4 by , 16 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:5 by , 16 years ago
milestone: | → 1.1 |
---|---|
Status: | new → assigned |
comment:6 by , 16 years ago
milestone: | 1.1 → 1.2 |
---|
comment:7 by , 15 years ago
milestone: | 1.2 |
---|
1.2 is feature-frozen, moving this feature request off the milestone.
comment:8 by , 14 years ago
Easy pickings: | unset |
---|---|
Needs tests: | set |
Severity: | → Normal |
Type: | → New feature |
Patch against SVN HEAD to allow the deletion of multiple features within the geodjango enabled admin interface