diff --git a/examples/vector-osm.html b/examples/vector-osm.html
index 2f4d57c292..c8e19ea2c0 100644
--- a/examples/vector-osm.html
+++ b/examples/vector-osm.html
@@ -6,6 +6,7 @@ docs: >
OSM XML vector data is loaded dynamically from a the [Overpass API](http://overpass-api.de) using a bbox strategy. Note that panning and zooming will eventually lead to "Too many requests" errors from the Overpass API.
tags: "vector, osmxml, loading, server, strategy, bbox"
cloak:
- As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5: Your Bing Maps Key from http://www.bingmapsportal.com/ here
+ - key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5
+ value: Your Bing Maps Key from http://www.bingmapsportal.com/ here
---
diff --git a/examples/vector-wfs-getfeature.html b/examples/vector-wfs-getfeature.html
index 894921a819..e04e55ba44 100644
--- a/examples/vector-wfs-getfeature.html
+++ b/examples/vector-wfs-getfeature.html
@@ -8,6 +8,7 @@ docs: >
that match the query.
tags: "vector, WFS, GetFeature, filter"
cloak:
- As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5: Your Bing Maps Key from http://www.bingmapsportal.com/ here
+ - key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5
+ value: Your Bing Maps Key from http://www.bingmapsportal.com/ here
---
diff --git a/examples/vector-wfs.html b/examples/vector-wfs.html
index 38de294e0a..8939a01f20 100644
--- a/examples/vector-wfs.html
+++ b/examples/vector-wfs.html
@@ -6,6 +6,7 @@ docs: >
This example loads new features from GeoServer WFS when the view extent changes.
tags: "vector, WFS, bbox, loading, server"
cloak:
- As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5: Your Bing Maps Key from http://www.bingmapsportal.com/ here
+ - key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5
+ value: Your Bing Maps Key from http://www.bingmapsportal.com/ here
---
diff --git a/examples/webpack/example-builder.js b/examples/webpack/example-builder.js
index 398c6483a2..0e94e020aa 100644
--- a/examples/webpack/example-builder.js
+++ b/examples/webpack/example-builder.js
@@ -151,8 +151,8 @@ ExampleBuilder.prototype.render = async function(dir, chunk) {
}
}
if (data.cloak) {
- for (const key in data.cloak) {
- jsSource = jsSource.replace(new RegExp(key, 'g'), data.cloak[key]);
+ for (const entry of data.cloak) {
+ jsSource = jsSource.replace(new RegExp(entry.key, 'g'), entry.value);
}
}
data.js = {
diff --git a/examples/xyz.html b/examples/xyz.html
index 06dcd16fdd..72d3c3d6af 100644
--- a/examples/xyz.html
+++ b/examples/xyz.html
@@ -6,7 +6,8 @@ docs: >
The XYZ source is used for tile data that is accessed through URLs that include a zoom level and tile grid x/y coordinates.
tags: "xyz"
cloak:
- 0e6fc415256d4fbb9b5166a718591d71: Your API key from http://www.thunderforest.com/docs/apikeys/ here
+ - key: 0e6fc415256d4fbb9b5166a718591d71
+ value: Your API key from http://www.thunderforest.com/docs/apikeys/ here
---
diff --git a/examples/zoom-constrained.html b/examples/zoom-constrained.html
index 0534eb24ba..091d56c107 100644
--- a/examples/zoom-constrained.html
+++ b/examples/zoom-constrained.html
@@ -6,6 +6,7 @@ docs: >
This map has a view that is constrained between zoom levels 9 and 13. This is done using the `minZoom` and `maxZoom` view options.
tags: "bing, zoom, minZoom, maxZoom"
cloak:
- As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5: Your Bing Maps Key from http://www.bingmapsportal.com/ here
+ - key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5
+ value: Your Bing Maps Key from http://www.bingmapsportal.com/ here
---