Make clear how to remove an unmanaged layer from a map

This commit is contained in:
Andreas Hocevar
2015-06-09 13:39:33 +02:00
parent 57e1dda5f1
commit 9acd65270a
2 changed files with 11 additions and 3 deletions

View File

@@ -149,8 +149,9 @@ ol.layer.Layer.prototype.handleSourcePropertyChange_ = function() {
/**
* Sets the layer to be rendered on a map. The map will not manage this layer in
* its layers collection, and the layer will be rendered on top. This is useful
* for temporary layers. To add the layer to a map and have it managed by the
* map, use {@link ol.Map#addLayer} instead.
* for temporary layers. To remove an unmanaged layer from the map, use
* `#setMap(null)`. To add the layer to a map and have it managed by the map,
* use {@link ol.Map#addLayer} instead.
* @param {ol.Map} map Map.
* @api
*/