commit
46b42968bc
@ -0,0 +1,26 @@
|
||||
var width = 8000,
|
||||
height = 6000;
|
||||
|
||||
var svg = d3.select('body')
|
||||
.append('svg')
|
||||
.attr('width', width)
|
||||
.attr('height', height);
|
||||
|
||||
var g = svg.append('g');
|
||||
|
||||
var albersProjection = d3.geoNaturalEarth1();
|
||||
// .scale(200000)
|
||||
// .scale(2000)
|
||||
// .rotate([0, 0])
|
||||
// .center([0, 0]);
|
||||
|
||||
|
||||
var geoPath = d3.geoPath()
|
||||
.projection(albersProjection);
|
||||
|
||||
g.selectAll('path')
|
||||
.data(map_json.features)
|
||||
.enter()
|
||||
.append('path')
|
||||
.attr('fill', '#ccc')
|
||||
.attr('d', geoPath)
|
||||
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<script src="https://d3js.org/d3.v5.min.js" charset="utf-8"></script>
|
||||
<script src="map_data3.js" charset="utf-8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script src="app.js" charset="utf-8"></script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue