From 0c06b83e86428235f2196eb0069231350d91f0bc Mon Sep 17 00:00:00 2001 From: malwoodsantoro Date: Tue, 14 Apr 2020 21:27:37 -0700 Subject: [PATCH 1/4] clarify how map.moveLayer works --- src/ui/map.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ui/map.js b/src/ui/map.js index 2f06d6f87e8..04b9a6851ad 100755 --- a/src/ui/map.js +++ b/src/ui/map.js @@ -1704,13 +1704,12 @@ class Map extends Camera { * Moves a layer to a different z-position. * * @param {string} id The ID of the layer to move. - * @param {string} [beforeId] The ID of an existing layer to insert the new layer before. - * If this argument is omitted, 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. The layer you are moving will visually sit beneath the layer with ID `beforeId`. If `beforeId` is omitted, the layer will be appended to the end of the layers array and appear above all other layers on the map. * @returns {Map} `this` * * @example - * // Move a layer with ID 'label' before the layer with ID 'waterways'. - * map.moveLayer('label', 'waterways'); + * // Move a layer with ID 'polygon' before the layer with ID 'country-label'. The `polygon` layer will appear beneath the `country-label` layer on the map. + * map.moveLayer('polygon', 'country-label'); */ moveLayer(id: string, beforeId?: string) { this.style.moveLayer(id, beforeId); From 790220ea94b7cd5a9eb2312f65dd164bd9dc82c3 Mon Sep 17 00:00:00 2001 From: malwoodsantoro Date: Tue, 14 Apr 2020 21:35:56 -0700 Subject: [PATCH 2/4] fix wording --- src/ui/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/map.js b/src/ui/map.js index 04b9a6851ad..af97c1b6b53 100755 --- a/src/ui/map.js +++ b/src/ui/map.js @@ -1704,7 +1704,7 @@ class Map extends Camera { * Moves a layer to a different z-position. * * @param {string} id The ID of the layer to move. - * @param {string} [beforeId] The ID of an existing layer to insert the new layer before. The layer you are moving will visually sit beneath the layer with ID `beforeId`. If `beforeId` is omitted, the layer will be appended to the end of the layers array and appear above all other layers on the map. + * @param {string} [beforeId] The ID of an existing layer to insert the new layer before. When viewing the map, the layer you are moving will appear beneath the layer with ID `beforeId`. If `beforeId` is omitted, the layer will be appended to the end of the layers array and appear above all other layers on the map. * @returns {Map} `this` * * @example From 24fcc56b715f0dcb75d4581ad1b4bb92a6beebfe Mon Sep 17 00:00:00 2001 From: malwoodsantoro Date: Tue, 14 Apr 2020 21:43:51 -0700 Subject: [PATCH 3/4] small wording fix --- src/ui/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/map.js b/src/ui/map.js index af97c1b6b53..1ea2b8ddd60 100755 --- a/src/ui/map.js +++ b/src/ui/map.js @@ -1704,7 +1704,7 @@ class Map extends Camera { * Moves a layer to a different z-position. * * @param {string} id The ID of the layer to move. - * @param {string} [beforeId] The ID of an existing layer to insert the new layer before. When viewing the map, the layer you are moving will appear beneath the layer with ID `beforeId`. If `beforeId` is omitted, the layer will be appended to the end of the layers array and appear above all other layers on the map. + * @param {string} [beforeId] The ID of an existing layer to insert the new layer before. When viewing the map, the `ID` layer will appear beneath the `beforeId` layer. If `beforeId` is omitted, the layer will be appended to the end of the layers array and appear above all other layers on the map. * @returns {Map} `this` * * @example From a9ff27c715e2b254623e8c19026de4d000ff768f Mon Sep 17 00:00:00 2001 From: malwoodsantoro Date: Tue, 14 Apr 2020 21:46:33 -0700 Subject: [PATCH 4/4] fix id capitalization --- src/ui/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/map.js b/src/ui/map.js index 1ea2b8ddd60..7a96117b246 100755 --- a/src/ui/map.js +++ b/src/ui/map.js @@ -1704,7 +1704,7 @@ class Map extends Camera { * Moves a layer to a different z-position. * * @param {string} id The ID of the layer to move. - * @param {string} [beforeId] The ID of an existing layer to insert the new layer before. When viewing the map, the `ID` layer will appear beneath the `beforeId` layer. If `beforeId` is omitted, the layer will be appended to the end of the layers array and appear above all other layers on the map. + * @param {string} [beforeId] The ID of an existing layer to insert the new layer before. When viewing the map, the `id` layer will appear beneath the `beforeId` layer. If `beforeId` is omitted, the layer will be appended to the end of the layers array and appear above all other layers on the map. * @returns {Map} `this` * * @example