Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't drag a map when clicking on a feature in a vector layer

Tags:

openlayers

I've got an OpenLayers map with a tile layer and Vector layer. The Vector layer has got an OpenLayers.Control.SelectFeature which is used to display a tooltip when the mouse hovers over a feature. Unfortunately this seems to prevent the map being moved if a feature is clicked and dragged.

Looking at the OpenLayers code, the SelectFeature just throws the click away because hover is set to true. Is there a way of passing the click event on to the map so that it can be moved?

I'm pretty sure the SelectFeature is the cause of the problem, since when I comment it out, drag works as expected.

Can anyone help?

like image 606
user1642523 Avatar asked Dec 16 '22 19:12

user1642523


1 Answers

Do not quite understand the problem, but maybe this will help:

selectControl.handlers.feature.stopDown = false;
like image 59
winsent Avatar answered May 14 '23 13:05

winsent