Draw a map of India with D3.js, Topojson, and five simple functions:
centerZoom
- Automatically centers and scales your map to its container, and returns your map's outer boundaries in case you want to draw them.drawOuterBoundary
- Uses the boundary returned from centerZoom
to draw a boundary around your whole map.drawPlaces
- Draws place names, if your topojson has places.drawSubunits
- Draws subunits.colorSubunits
- Colors the subunits.This map uses a Mercator projection, and the colors are generated from d3.schemeCategory20
. For a tutorial on converting Geojson to Topojson and for finding the coordinates of major cities, see this tutorial.
forked from HarryStevens's block: India Mercator
Modified http://d3js.org/d3.v3.min.js to a secure url
Modified http://labratrevenge.com/d3-tip/javascripts/d3.tip.v0.6.3.js to a secure url
https://d3js.org/d3.v3.min.js
https://labratrevenge.com/d3-tip/javascripts/d3.tip.v0.6.3.js