Skip to main content
100%

Fork of Map using Canvas

✓ Published0🌍 Public
SShweta-tech
Last edited Jun 5, 2021
Created on Jun 5, 2021
Forked from Map using Canvas

This example renders a map of India using D3's `d3.geoMercator` projection and `d3.geoPath` with a Canvas 2D context. It draws the GeoJSON boundaries of Indian states with white fill and black strokes onto an 890×430 canvas. The code loads the geographic data from a remote GeoJSON file and also references the `random-points-on-polygon` library, though it does not explicitly generate points in the visible script. The map is centered on coordinates [80, 22.9] and uses a mercator projection scaled to the canvas width.

AI-generated description

Map on canvas using D3

MIT Licensed

Similar vizzes