score:5

Accepted answer

There's no need (and it would be pretty difficult and somewhat expensive computationally) to figure out the inverse of the landmass. But you can just color the background.

I.e you can use CSS:

svg {
  background: lightBlue;
}

or you can prepend a <rect> element with a blue fill behind the map:

svg.append('rect')
  .attr('width', mapWidth)
  .attr('height', mapHeight)
  .attr('fill', 'lightBlue')

score:0

Just want to add to this: in order to only color the globe itself you have to make your svg a circle using border-radius. The result looks great, though: http://codeasart.com/globe/


Related Query