Skip to main content
100%

Mercator projection

✓ Published0🌍 Public
CClevejones
Last edited Nov 12, 2015
Created on Nov 12, 2015

This example displays a simple Mercator projection map of Scotland, rendered as black outlines on a white SVG canvas. It loads GeoJSON boundary data from an external file and draws each feature as a separate path element. The code uses D3 v3’s `d3.geo.mercator()` to define the projection, `d3.geo.path()` to generate the path data, and `d3.json()` to fetch the geographic data. The map is centered at longitude 0° and latitude 40°, with a scale relative to the 900×900 pixel viewport. No interaction or styling beyond the default fill is included.

AI-generated description

Similar vizzes