Я изучаю топожсон с d3. У меня есть информация о координатах земли, которая отображается правильно. Тогда как я могу добавить цвет океану (в основном за пределами суши)? Я пробовал раскрашивать сетку, но не заполняет всю карту и оставляет пустые места.
Визуализация размещена на http://jbk1109.github.io/.
var projection = d3.geo.stereographic()
.scale(245)
.translate([width / 2, height / 2])
.rotate([-20, 0])
.clipAngle(180 - 1e-4)
.clipExtent([[0, 0], [width, height]])
.precision(.1);
var path = d3.geo.path()
.projection(projection)
var graticule = d3.geo.graticule();
var g = svg.append("g")
svg.append("path")
.datum(graticule)
.attr("class", "graticule")
.attr("d", path)
.style("fill","none")
.style("stroke","#777")
.style("stroke-width",0.2)
var land = svg.insert("path", ".graticule")
.datum(topojson.feature(world, world.objects.land))
.attr("class", "land")
.attr("d", path)
.style("fill",'#cbcbcb')
.style("opacity",0.8)