D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
FrieseWoudloper
Full window
Github gist
ZONDER TURFFFFF
<!DOCTYPE html> <script src="https://d3js.org/d3.v4.min.js"></script> <div class="graph"></div> <script> var width = 700, height = 400; var svg = d3.select(".graph").append("svg") .attr("viewBox", "0 0 " + (width) + " " + (height)) .style("max-width", "700px"); var url = "https://geodata.nationaalgeoregister.nl/cbsgebiedsindelingen/wfs?service=wfs&request=GetFeature&typeName=cbs_arrondissementsgebied_2019_gegeneraliseerd&outputFormat=json&srsName=EPSG:4326"; d3.json(url, function(error, mapdata) { var projection = d3.geoMercator(); var path = d3.geoPath().projection(projection); projection.fitSize([width, height], {"type": "FeatureCollection", "features": mapdata.features}); svg.append("g") .attr("class", "gemeente") .selectAll("path") .data(mapdata.features) .enter() .append("path") .attr("d", path); }); </script>
https://d3js.org/d3.v4.min.js