parent
46b42968bc
commit
c29c356019
@ -1,26 +1,18 @@
|
|||||||
var width = 8000,
|
var width = 1000,
|
||||||
height = 6000;
|
height = 600;
|
||||||
|
|
||||||
var svg = d3.select('body')
|
d3.select('svg')
|
||||||
.append('svg')
|
|
||||||
.attr('width', width)
|
.attr('width', width)
|
||||||
.attr('height', height);
|
.attr('height', height);
|
||||||
|
|
||||||
var g = svg.append('g');
|
var worldProjection = d3.geoNaturalEarth1();
|
||||||
|
|
||||||
var albersProjection = d3.geoNaturalEarth1();
|
|
||||||
// .scale(200000)
|
|
||||||
// .scale(2000)
|
|
||||||
// .rotate([0, 0])
|
|
||||||
// .center([0, 0]);
|
|
||||||
|
|
||||||
|
|
||||||
var geoPath = d3.geoPath()
|
var geoPath = d3.geoPath()
|
||||||
.projection(albersProjection);
|
.projection(worldProjection);
|
||||||
|
|
||||||
g.selectAll('path')
|
d3.select('svg').selectAll('path')
|
||||||
.data(map_json.features)
|
.data(map_json.features)
|
||||||
.enter()
|
.enter()
|
||||||
.append('path')
|
.append('path')
|
||||||
.attr('fill', '#ccc')
|
.attr('fill', '#099')
|
||||||
.attr('d', geoPath)
|
.attr('d', geoPath)
|
||||||
|
|||||||
Loading…
Reference in new issue