getLayers will return the collection of layers of the map, and you can listen for add and remove there:

https://openlayers.org/en/latest/apidoc/ol.Collection.html


On 11-02-18 21:46, Troy Coburn via OpenLayers Dev wrote:
I've been looking all over and can't seem to find anything.

Is there an event that is fired when a layer is added or removed from the map?

Cheers!

Troy
--
You received this message because you are subscribed to the Google Groups "OpenLayers Dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to openlayers-dev+unsubscr...@googlegroups.com <mailto:openlayers-dev+unsubscr...@googlegroups.com>. To post to this group, send email to openlayers-dev@googlegroups.com <mailto:openlayers-dev@googlegroups.com>.
Visit this group at https://groups.google.com/group/openlayers-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/openlayers-dev/6d010044-03b9-4afe-96cf-17e801a117f6%40googlegroups.com <https://groups.google.com/d/msgid/openlayers-dev/6d010044-03b9-4afe-96cf-17e801a117f6%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
Bart van den Eijnden
JavaScript developer | Boundless
bart...@boundlessgeo.com

--
You received this message because you are subscribed to the Google Groups 
"OpenLayers Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to openlayers-dev+unsubscr...@googlegroups.com.
To post to this group, send email to openlayers-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/openlayers-dev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/openlayers-dev/f2bca05c-ec83-8427-49de-ad7652d7dac3%40boundlessgeo.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to