How to use the d3-geo-projection.geoSatellite function in d3-geo-projection

To help you get started, we’ve selected a few d3-geo-projection examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github VisualPerspective / globe-viewer / app / js / svgLayer.js View on Github external
constructor(gl, vectors, camera) {
    this.gl = gl
    this.camera = camera
    this.options = { countries: { enabled: true } }
    this.countries = topojson.feature(vectors, vectors.objects.countries)

    this.canvas = d3.select('.map-canvas').append('canvas')
      .attr('class', 'svg-layer')

    this.ctx = this.canvas.node().getContext('2d')

    this.projection = projection.geoSatellite()

    this.path = geo.geoPath().projection(this.projection).context(this.ctx)

    window.addEventListener('resize', () => { this.resize() })
    this.resize()
    this.draw()
  }