OK, so i'm using Openlayers to draw a polygon on a map for a geofield.
I can draw the polygon(s), no problem.

But, once I've drawn them, I don't have good edit control.
I can move the vertices around, and create new vertices, but I can't delete vertices or delete the polygon.

Is there something obvious I'm missing here?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AaronBauman’s picture

Category: support » bug
Status: Active » Needs review
FileSize
899 bytes

This seems to be a bug, actually.
A few things are going wrong in openlayers_behavior_drawfeatures.js
1. $ is not defined in this context. should be jQuery instead.
2. this.selectControl is not defined
3. Openlayers ModifyControl handles deletion out of the box, there's no need for a handleKeypress callback

Attached patch resolved the issue for me.

Pol’s picture

Status: Needs review » Fixed

Thank you very much, committed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Pol’s picture

Status: Closed (fixed) » Needs work

Since this patch, I can't delete vertice in chrome, reverting the patch.

Pol’s picture

Assigned: Unassigned » Pol
Issue summary: View changes
Pol’s picture

This patch is working, the problem was from Geofield, see #2169989: Add 'delete feature' ability.

Committed again.

Pol’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.