diff --git a/examples/d3.html b/examples/d3.html
index 6dcbfecc66..789c0637f7 100644
--- a/examples/d3.html
+++ b/examples/d3.html
@@ -6,7 +6,7 @@ docs: >
The example loads TopoJSON geometries and uses d3 (d3.geo.path) to render these geometries to a SVG element.
tags: "d3"
resources:
- - https://unpkg.com/d3@4.12.0/build/d3.js
+ - https://unpkg.com/d3@5.9.2/dist/d3.js
- https://unpkg.com/topojson@3.0.2/dist/topojson.js
---
diff --git a/examples/d3.js b/examples/d3.js
index 8a9af6e19d..672c4b7719 100644
--- a/examples/d3.js
+++ b/examples/d3.js
@@ -85,7 +85,7 @@ const map = new Map({
/**
* Load the topojson data and create an ol/layer/Image for that data.
*/
-d3.json('data/topojson/us.json', function(error, us) {
+d3.json('data/topojson/us.json').then(function(us) {
const layer = new CanvasLayer({
features: topojson.feature(us, us.objects.counties)
diff --git a/examples/data/square.svg b/examples/data/square.svg
new file mode 100644
index 0000000000..0b7a912a53
--- /dev/null
+++ b/examples/data/square.svg
@@ -0,0 +1,7 @@
+
+
+
diff --git a/examples/export-map.css b/examples/export-map.css
new file mode 100644
index 0000000000..9917279a2b
--- /dev/null
+++ b/examples/export-map.css
@@ -0,0 +1,6 @@
+.overlay {
+ background-color: yellow;
+ border-radius: 6px;
+ padding: 4px;
+ white-space: nowrap;
+}
diff --git a/examples/export-map.html b/examples/export-map.html
index 4ab8686cbb..9e45f5e986 100644
--- a/examples/export-map.html
+++ b/examples/export-map.html
@@ -8,5 +8,8 @@ docs: >
tags: "export, png, openstreetmap"
---
+
Download PNG
diff --git a/examples/export-map.js b/examples/export-map.js
index f402a0fa86..c3b5512347 100644
--- a/examples/export-map.js
+++ b/examples/export-map.js
@@ -1,5 +1,6 @@
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
+import Overlay from '../src/ol/Overlay.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js';
@@ -25,11 +26,17 @@ const map = new Map({
})
});
+map.addOverlay(new Overlay({
+ position: [0, 0],
+ element: document.getElementById('null')
+}));
+
+
// export options for html-to-image.
// See: https://github.com/bubkoo/html-to-image#options
const exportOptions = {
filter: function(element) {
- return element.className.indexOf('ol-control') === -1;
+ return element.className ? element.className.indexOf('ol-control') === -1 : true;
}
};
diff --git a/examples/full-screen-drag-rotate-and-zoom.css b/examples/full-screen-drag-rotate-and-zoom.css
index 1a4cbf846e..ead380e32a 100644
--- a/examples/full-screen-drag-rotate-and-zoom.css
+++ b/examples/full-screen-drag-rotate-and-zoom.css
@@ -1,5 +1,6 @@
.map:-webkit-full-screen {
height: 100%;
+ margin: 0;
}
.map:-ms-fullscreen {
height: 100%;
diff --git a/examples/full-screen-source.css b/examples/full-screen-source.css
index 4032bd528b..958e346cc5 100644
--- a/examples/full-screen-source.css
+++ b/examples/full-screen-source.css
@@ -1,5 +1,6 @@
.fullscreen:-webkit-full-screen {
height: 100%;
+ margin: 0;
}
.fullscreen:-ms-fullscreen {
height: 100%;
diff --git a/examples/full-screen.css b/examples/full-screen.css
index 494567cfe4..5bb198a848 100644
--- a/examples/full-screen.css
+++ b/examples/full-screen.css
@@ -1,5 +1,6 @@
.map:-webkit-full-screen {
height: 100%;
+ margin: 0;
}
.map:-ms-fullscreen {
height: 100%;
diff --git a/examples/heatmap-earthquakes.html b/examples/heatmap-earthquakes.html
index 612b1206fc..e20d7f58b0 100644
--- a/examples/heatmap-earthquakes.html
+++ b/examples/heatmap-earthquakes.html
@@ -4,7 +4,7 @@ title: Earthquakes Heatmap
shortdesc: Demonstrates the use of a heatmap layer.
docs: >
This example parses a KML file and renders the features as a ol/layer/Heatmap layer.
-tags: "heatmap, kml, vector, style"
+tags: "heatmap, kml, vector, style, webgl"
---