The Book of OpenLayers3 [Code samples]

These are the code samples for The Book of OpenLayer3. Feel free to download the source code and contribute to this repository:

Adding and removing layers

Show how we can programmatically add and remove layer to/from the map.

Note the map has been initialized without layers. You can add or remove any of the below layers.

OpenStreetMap
MapQuest

Source code: