[OpenLayers-Dev] Problem with events in OpenLayers 2.5

Christopher Schmidt crschmidt at metacarta.com
Tue Oct 16 09:44:45 EDT 2007


On Tue, Oct 16, 2007 at 01:38:35PM +0000, victor victor wrote:
> The same behavior. I only draw the border to define the icon area. I don't
> know what is happening but the behavior is different with diferent target objects, this is:
> 
> if I code something like this 
>     this.marker.events.register("mouseover",  this,
>   this.mouseover);
> it is different than this one
> 
>     this.marker.events.register("mouseover",  this.marker,
>   this.mouseover);
> 
> In the second case it doesn't work in IE 6.0 neither in Firefox.

Well, I don't know what 'doesn't work' means -- the difference between
these is that in the latter case, the 'this' inside this.mouseover is
different, so you might be getting an error thrown because some property
used inside this.mouseover doesn't exist...

Check your error console? Get Firebug, and put a console.log() inside
this.mouseover to see if it's working? 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list