node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

interactive-earth-polygons

Interactive Earth Polygons

Display polygons on an interactive earth.

See the Interactive Earth Handbook for an example of how to group interactive-earth modules together into a visualisation.

var polygons = require('interactive-earth-polygons');
var polygonLayer = polygons({
  classname: 'polygon',
  geo: {
    type: 'Polygon'
    coordinates: [
        [165, -48],
        [180, -48],
        [180, -34],
        [165, -34]
    ]
  }
});
 
...
 
layers.push(['polygon', polygonLayer]);