On 07/22/2010 10:58 AM, M. Rizwan Khan wrote:
Hi All,
I am new bee to Openlayer.
I have a simple problem, I want whenever someone checks a certain layer
to display, message is displayed to about that layer.
I dont know how to do to so.........
Thanks in advance,
Rizwan
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users
Register a listener for the "changelayer" event on the map I guess is what you
want.
Something along the lines of
map.events.register("changelayer", this, changelayer);
function changelayer(evt){
if(evt.property == "visibility" && evt.layer.getVisibility()){
console.log("layer " + evt.layer.name + " activated");
}
}
hope this helps you along
-atle
--
Atle Frenvik Sveen
Utvikler
Geomatikk IKT AS
tlf: 45 27 86 89
[email protected]
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users