[OpenLayers-Dev] Problem with events in Attribution and copyright field [ticket #103]

Christian López Espínola penyaskito at gmail.com
Sat May 26 17:44:11 EDT 2007


Hi all,

I'm working on ticket #103. I have tested the patch I attached and I
have found that it works well with base layers, but not updates with
overlays.

Looking at the code, I have seen that no event is triggered in the
checks at the LayerSwitcher (see LayerSwitcher, onInputClick function,
next to line 232).

Chris Schmidt pointed me at IRC that the event is triggered in the
setVisibility of layer in the updateMap call.

Debugging with firebug shows me that when the code reaches the
setVisibility method in Layer, at

 if ((this.map != null) && ((noEvent == null) || (noEvent == false))) {
      this.map.events.triggerEvent("changelayer");

the noEvent parameter value is true, so the event is not triggered.

I have the following options:
- Study if the code above at Layer should be changed.
- Trigger the event at the onInputClick function at LayerSwitcher.

How should I solve this?

TIA



-- 
Regards,

Christian López Espínola


More information about the Dev mailing list