addTo() can be called with a map or layer group. (#5600)
This commit is contained in:
parent
44122b632e
commit
54a87e0902
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user