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 authored and jfirebaugh committed Jan 2, 2018
1 parent aa49824 commit ca01a1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/style/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,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 @@ -568,7 +568,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 ca01a1e

Please sign in to comment.