Skip to content

Commit

Permalink
in Style's addLayer and moveLayer the before param is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewharvey committed Nov 30, 2017
1 parent 5fa04bc commit 79574e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/style/style.js
Expand Up @@ -547,7 +547,7 @@ class Style extends Evented {
/**
* Add a layer to the map style. The layer will be inserted before the layer with
* ID `before`, or appended if `before` is omitted.
* @param {string} before ID of an existing layer to insert before
* @param {string} [before] ID of an existing layer to insert before
*/
addLayer(layerObject: LayerSpecification, before?: string, options?: {validate?: boolean}) {
this._checkLoaded();
Expand Down Expand Up @@ -605,7 +605,7 @@ class Style extends Evented {
* Moves a layer to a different z-position. The layer will be inserted before the layer with
* ID `before`, or appended if `before` is omitted.
* @param {string} id ID of the layer to move
* @param {string} before ID of an existing layer to insert before
* @param {string} [before] ID of an existing layer to insert before
*/
moveLayer(id: string, before?: string) {
this._checkLoaded();
Expand Down

0 comments on commit 79574e5

Please sign in to comment.