[OpenLayers-Users] Events on text labels

Paul Spencer pagameba at gmail.com
Fri Jul 17 09:58:28 EDT 2009


On 17-Jul-09, at 9:28 AM, Tamlyn Rhodes wrote:

>> oh, sorry didn't see that.  I haven't tried that patch so I can't  
>> comment on
>> it :)
>
> I tried applying just your patch to a fresh copy of OpenLayers-2.8 but
> I still can't get it to work. I'm sorry, I'm probably being dumb.
> Could you perhaps provide a simple example of making a label clickable
> using your patch?

difficult to debug ... here is what I would do:

* confirm that I am using the OpenLayers source that I think I am  
using (if using a single file build, make sure the single file is  
built with the patches)
* confirm using firebug that the changes are actually in the source code
* set a breakpoint in getFeatureIdFromEvent (Elements.js) and see if  
evt.target is the right thing (a textbox node) and that it has a  
_featureId property (which is what is returned and which makes the  
selection work).

Cheers

Paul



More information about the Users mailing list