interactive-earth-tiles

2.1.1 • Public • Published

Interactive Earth Tiles

Rasterise tiles onto any d3 geo projection.

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

var tiles = require('interactive-earth-tiles');
var graticule = require('interactive-earth-tiles/graticule');
var coords = require('interactive-earth-tiles/coords');

// All options shown
var naturalearth = tiles({
  classname: '',
  url: '//{subdomain}.tiles.mapbox.com/v3/mapbox.natural-earth-2/{z}/{x}/{y}.png'
  subdomains: ['a', 'b', 'c', 'd'],
  scaleExtent: [0, 6],
  tms: false
});

var graticuleLayer = graticule();

var coordsLayer = coords();

...

layers.push(['tiles', naturalearth]);
layers.push(['graticule', graticuleLayer]);
layers.push(['coords', coordsLayer]);

...

earth.render(layers, projection, quad);

/interactive-earth-tiles/

    Package Sidebar

    Install

    npm i interactive-earth-tiles

    Weekly Downloads

    1

    Version

    2.1.1

    License

    MIT

    Last publish

    Collaborators

    • ascendzor
    • tcoats