[OpenLayers-Users] events.register only fires once?

Eric Lemoine eric.c2c at gmail.com
Thu Sep 4 16:44:19 EDT 2008


Hi. If you do map.events.register("changebaselayer", map, yourFunc())
then your function is called and it is its return value that you
actually pass as the third arg of the register call. Instead you
should do map.events.register("changebaselayer", map, yourFunc) to
actually pass register a reference to your function. Hope this helps.
Eric

2008/9/3, slyon <skylar at ccri.com>:
>
> Hi,
>
> I've set up an events.register("changebaselayer", this.map, myFunction())...
> and when the map first loads the event fires and myFunction is executed.
> However, anytime thereafter that I change base layers the event doesn't
> fire. I can not figure out why; can anyone advise?
>
> Thank you,
>
> Skylar
> --
> View this message in context:
> http://www.nabble.com/events.register-only-fires-once--tp19293525p19293525.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



More information about the Users mailing list