Skip to main content
Public

Share visualization

Loading preview…

Fork of Map using Canvas

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Map using Canvas

0
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

Comments

Sign in to join the discussion.

MIT Licensed