Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@HarryStevens
Last active January 15, 2022 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HarryStevens/a9ed9fd00cce00008c18ce9384014937 to your computer and use it in GitHub Desktop.
Save HarryStevens/a9ed9fd00cce00008c18ce9384014937 to your computer and use it in GitHub Desktop.
Scale Bar In Washington, D.C.
license: gpl-3.0

When using d3-geo-scale-bar, scaleBar.radius will also come in handy if you want to plot units on Earth other than kilometers, miles, meters, or feet, all of which come with preset units. For instance, when adding a scale bar to a map of a small area, you can set scaleBar.radius to 6967419.888, the mean radius of the Earth in yards.

For example, here is a map of buildings near the National Mall in Washington, D.C., using data from the great Open Data DC.

Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment