addTo() can be called with a map or layer group. (#5600)

This commit is contained in:
Tim 2017-07-03 10:18:02 +01:00 committed by Per Liedman
parent 44122b632e
commit 54a87e0902

View File

@ -45,8 +45,8 @@ export var Layer = Evented.extend({
/* @section
* Classes extending `L.Layer` will inherit the following methods:
*
* @method addTo(map: Map): this
* Adds the layer to the given map
* @method addTo(map: Map|LayerGroup): this
* Adds the layer to the given map or layer group.
*/
addTo: function (map) {
map.addLayer(this);