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)