Last active
September 14, 2019 14:23
-
-
Save FrieseWoudloper/221f98116940701e3889b3cfaf077afc to your computer and use it in GitHub Desktop.
test met arrondissementen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<style> | |
</style> | |
</head> | |
<body> | |
<script type='text/javascript'> | |
var w = 600; | |
var h = 400; | |
//setup our display area | |
var svg = d3.select('body') | |
.append('svg') | |
.attr('w',w+'px') | |
.attr('h',h+'px'); | |
//make an path object to convert from geojson paths to svg paths | |
var path = d3.geo.path(); | |
//load the data | |
// url = "https://geodata.nationaalgeoregister.nl/cbsgebiedsindelingen/wfs?service=wfs&request=GetFeature&typeName=cbs_arrondissementsgebied_2019_gegeneraliseerd&outputFormat=json&srsName=EPSG:4326"; | |
d3.json("arrondissementen.json", function(json) { | |
//when the json file is loaded | |
// set up the paths for each state | |
svg.selectAll('path') | |
.data(json.features) | |
.enter() | |
.append("path") | |
.attr('d',path) //bind the converter | |
; | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment