[OpenLayers-Users] event when layer opacity change
Julien-Samuel Lacroix
jlacroix at mapgears.com
Fri Jan 25 17:04:55 PST 2013
Hi,
setOpacity calls the map changelayer event. When this event is called,
the layer changed is passed.
So you could add a listener on this event and check which layer was
changed and act accordingly.
Here's the code that trigger the event (from Layer.js):
this.map.events.triggerEvent("changelayer", {
layer: this,
property: "opacity"
});
Best regards,
Julien
On 13-01-25 04:12 PM, Steve.Toutant at inspq.qc.ca wrote:
> Hi,
>
> When a layer's opacity is changed, I would like to assign the new
> opacity to another layer. I found the map event layerchange, but is
> there an event on the layer? That would be easier to use to me.
>
> I'm using geoext slider to change the opacity
>
> thanks
>
> steve
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
More information about the Users
mailing list