[OpenLayers-Users] Editing Toolbar Polygon Select Problem
Eric Lemoine
eric.lemoine at camptocamp.com
Thu May 3 18:13:04 EDT 2012
On Thu, Apr 19, 2012 at 8:43 AM, ibrahim saricicek
<ibrahimsaricicek at gmail.com> wrote:
> Dear All,
>
> On OpenLayers 2.11 and on this example
> http://openlayers.org/dev/examples/highlight-feature.html, when navigation
> (the hand icon) is selected, feature selection doesn't work.
> On the example draw a polygon or line and then select navigation and try to
> select, you can see it doesn't work.
> What should i do?
When activating the Navigation control again its Drag handler comes
first in the mousedown event chain and stops event propagation. This
is because stopDown defaults to true in the Drag handler. Doing
`OpenLayers.Handler.Drag.prototype.stopDown = false` in the example
should fix the issue. Another cleaner way to solve the problem:
var editing = new OpenLayers.Control.EditingToolbar(vectors);
map.addControl(editing);
editing.getControlsByClass('OpenLayers.Control.Navigation')[0].dragPan.handler.stopDown
= false;
But really, there shouldn't be an EditingToolbar in this example. I've
removed it.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list