[OpenLayers-Users] Using the SelectFeature control along with
markers
Christopher Schmidt
crschmidt at metacarta.com
Wed Apr 25 12:10:31 EDT 2007
On Wed, Apr 25, 2007 at 06:10:30PM +0300, Ehud Shabtai wrote:
> Hi,
>
> I'm using the SelectFeature (with hover: true) on a GML layer. The
> control is created and activated when the application initializes.
> I also have a markers layer with some markers, however I can't seem to
> get the "mousedown" event of a marker, unless I turn off the GML
> layer.
>
> I guess that the SelectFeature control does not pass along the mouse
> click event. Is there a way to let it pass the event to the markers
> layer?
If your markers layer is above the GML layer, the markers will receive
clicks.
However, it seems that SVG 'blocks' clicks from getting through to lower
layers, so you can't click through.
This behavior is browser specific -- Firefox does it, Safari does not.
The SelectFeature control will automatically move the seection layer to
the top, so when selectFeature is activated, you will not be able to
click through.
If you deactivate it, you should be able to get to markers if the
markers layer is added after (above) the others.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list