Skip to content

Commit

Permalink
update addLayer beforeId documentation to mention how it appears (#9758)
Browse files Browse the repository at this point in the history
visually in the style

While mentioning the before/after order is important since it relates to
the layers array, it requires users to know how the layers array order
relates to visual layering on the map. By specifying both here we hope
to avoid such confusion.
  • Loading branch information
andrewharvey authored Jun 4, 2020
1 parent 44dc609 commit 00ceca1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ui/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -1798,8 +1798,10 @@ class Map extends Camera {
* @param {Object} [layer.metadata] (optional) Arbitrary properties useful to track with the layer, but do not influence rendering.
* @param {string} [layer.renderingMode] This is only applicable for layers with the type `custom`.
* See {@link CustomLayerInterface} for more information.
* @param {string} [beforeId] The ID of an existing layer to insert the new layer before.
* If this argument is not specified, the layer will be appended to the end of the layers array.
* @param {string} [beforeId] The ID of an existing layer to insert the new layer before,
* resulting in the new layer appearing visually beneath the existing layer.
* If this argument is not specified, the layer will be appended to the end of the layers array
* and appear visually above all other layers.
*
* @returns {Map} `this`
*
Expand Down

0 comments on commit 00ceca1

Please sign in to comment.