diff --git a/examples/bing-maps.html b/examples/bing-maps.html index e7c47fb159..4c7007d71c 100644 --- a/examples/bing-maps.html +++ b/examples/bing-maps.html @@ -5,6 +5,8 @@ shortdesc: Example of a Bing Maps layer. docs: >

When the Bing Maps tile service doesn't have tiles for a given resolution and region it returns "placeholder" tiles indicating that. Zoom the map beyond level 19 to see the "placeholder" tiles. If you want OpenLayers to display stretched tiles in place of "placeholder" tiles beyond zoom level 19 then set maxZoom to 19 in the options passed to ol.source.BingMaps.

tags: "bing, bing-maps" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/drag-and-drop-image-vector.html b/examples/drag-and-drop-image-vector.html index fefd7f5be3..e1097a2c0b 100644 --- a/examples/drag-and-drop-image-vector.html +++ b/examples/drag-and-drop-image-vector.html @@ -6,6 +6,8 @@ docs: > Example of using the drag-and-drop interaction with a ol.source.ImageVector. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. Each file is rendered to an image on the client. tags: "drag-and-drop-image-vector, gpx, geojson, igc, kml, topojson, vector, image" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/drag-and-drop.html b/examples/drag-and-drop.html index eb1d06558d..a3a90a0c8b 100644 --- a/examples/drag-and-drop.html +++ b/examples/drag-and-drop.html @@ -6,6 +6,8 @@ docs: > Example of using the drag-and-drop interaction. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. There is no projection transform support, so this will only work with data in EPSG:4326 and EPSG:3857. tags: "drag-and-drop, gpx, geojson, igc, kml, topojson" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/full-screen-drag-rotate-and-zoom.html b/examples/full-screen-drag-rotate-and-zoom.html index 46560b1b21..9316923cd5 100644 --- a/examples/full-screen-drag-rotate-and-zoom.html +++ b/examples/full-screen-drag-rotate-and-zoom.html @@ -6,6 +6,8 @@ docs: >

Hold down Shift + drag to rotate and zoom. Click the button in the top right corner to go full screen. Then do the Shift + drag thing again.

If there is no button on the map, your browser does not support the Full Screen API.

tags: "full-screen, drag, rotate, zoom, bing, bing-maps" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/full-screen.html b/examples/full-screen.html index 6a3feb5ef0..bd5b7bdd62 100644 --- a/examples/full-screen.html +++ b/examples/full-screen.html @@ -6,6 +6,8 @@ docs: >

Click the control in the top right corner to go full screen. Click it again to exit full screen.

If there is no button on the map, your browser does not support the Full Screen API.

tags: "full-screen, bing, bing-maps" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/gpx.html b/examples/gpx.html index b17550b139..128d2e4350 100644 --- a/examples/gpx.html +++ b/examples/gpx.html @@ -5,6 +5,8 @@ shortdesc: Example of using the GPX source. docs: > Example of using the GPX source. tags: "GPX" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/image-filter.html b/examples/image-filter.html index 931f56b4c6..94196be3a7 100644 --- a/examples/image-filter.html +++ b/examples/image-filter.html @@ -7,6 +7,8 @@ docs: > These listeners get an event with a reference to the Canvas rendering context. In this example, the postcompose listener applies a filter to the image data.

tags: "filter, image manipulation" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/kml.html b/examples/kml.html index a7f632b69f..05a50932e7 100644 --- a/examples/kml.html +++ b/examples/kml.html @@ -5,6 +5,8 @@ shortdesc: Example of using the KML source. docs: > Example of using the KML source. tags: "KML" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/layer-spy.html b/examples/layer-spy.html index 480acd6668..caac4fa1cc 100644 --- a/examples/layer-spy.html +++ b/examples/layer-spy.html @@ -9,6 +9,8 @@ docs: > recent mouse position, giving you a spyglass effect for viewing one layer over another.

Move around the map to see the effect. Use the ↑ up and ↓ down arrow keys to adjust the spyglass size.

tags: "spy, image manipulation" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/layer-swipe.html b/examples/layer-swipe.html index cb3b3b213e..e02d113cd9 100644 --- a/examples/layer-swipe.html +++ b/examples/layer-swipe.html @@ -5,6 +5,8 @@ shortdesc: Example of a Layer swipe map. docs: > Example of a Layer swipe map. tags: "swipe, openstreetmap" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/mobile-full-screen.html b/examples/mobile-full-screen.html index cf8aa84a51..e9be76a9f0 100644 --- a/examples/mobile-full-screen.html +++ b/examples/mobile-full-screen.html @@ -3,6 +3,8 @@ template: example-verbatim.html title: Full-Screen Mobile shortdesc: Example of a full screen map. tags: "fullscreen, geolocation, mobile" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here --- diff --git a/examples/preload.html b/examples/preload.html index 1318ed6e0e..f98292a7d7 100644 --- a/examples/preload.html +++ b/examples/preload.html @@ -5,6 +5,8 @@ shortdesc: Example of tile preloading. docs: >

The map on the top preloads low resolution tiles. The map on the bottom does not use any preloading. Try zooming out and panning to see the difference.

tags: "preload, bing" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
@@ -14,4 +16,3 @@ tags: "preload, bing"
- diff --git a/examples/raster.html b/examples/raster.html index 70d31c1d9b..1c57d39e04 100644 --- a/examples/raster.html +++ b/examples/raster.html @@ -22,6 +22,8 @@ tags: "raster, pixel" resources: - http://d3js.org/d3.v3.min.js - raster.css +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/region-growing.html b/examples/region-growing.html index 66f3065314..7cf769ff67 100644 --- a/examples/region-growing.html +++ b/examples/region-growing.html @@ -24,6 +24,8 @@ docs: > to the operation.

tags: "raster, region growing" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/vector-osm.html b/examples/vector-osm.html index 435709f83a..ef434a8c8e 100644 --- a/examples/vector-osm.html +++ b/examples/vector-osm.html @@ -5,6 +5,8 @@ shortdesc: Example of using the OSM XML source. docs: > OSM XML vector data is loaded dynamically from a server using a tiling strategy. tags: "vector, osm, xml, loading, server" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/vector-wfs.html b/examples/vector-wfs.html index 8c4d3fca02..595bbe5438 100644 --- a/examples/vector-wfs.html +++ b/examples/vector-wfs.html @@ -5,6 +5,8 @@ shortdesc: Example of using WFS with a BBOX strategy. docs: > This example loads new features from GeoServer WFS when the view extent changes. tags: "vector, WFS, bbox, loading, server" +cloak: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/examples/zoom-constrained.html b/examples/zoom-constrained.html index ec637768f6..58e0dee1f5 100644 --- a/examples/zoom-constrained.html +++ b/examples/zoom-constrained.html @@ -5,6 +5,8 @@ shortdesc: Example of a zoom constrained view. 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: + Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here ---
diff --git a/tasks/build-examples.js b/tasks/build-examples.js index 10c0ee1ddd..ac2ed10e40 100644 --- a/tasks/build-examples.js +++ b/tasks/build-examples.js @@ -83,6 +83,11 @@ function augmentExamples(files, metalsmith, done) { throw new Error('No .js file found for ' + filename); } var jsSource = files[jsFilename].contents.toString(); + if (file.cloak) { + for (var key in file.cloak) { + jsSource = jsSource.replace(new RegExp(key, 'g'), file.cloak[key]); + } + } var requires = getRequires(jsSource); file.requires = requires; file.js = {