Map & Globe
This example presents two synchronized geographic visualizations side by side: an interactive Leaflet.js map and a D3-based orthographic globe rendered on HTML5 Canvas. The Chiasm framework and its layout and links plugins manage the component layout and bidirectional data binding, so panning and zooming on the map updates the globe’s rotation and viewport circle, and dragging the globe repositions the map. The globe draws landmasses and country borders from a TopoJSON world dataset, while the map uses CartoDB basemap tiles. A gray circle on the globe indicates the map’s current viewport.
AI-generated descriptionPan and zoom in the map on the left to rotate the globe.
Click and drag the globe to pan on the map.
An example that shows a Chiasm plugin based on Leaflet.js alongside a Chiasm globe plugin based on the D3 example This is a Globe.
The Chiasm plugins demonstrated here are
layoutA plugin for nested box layout of arbitrary components.linksA plugin for data binding. This links the pan and zoom between the globe and the map.leafletA Leaflet-based geographic map component.globeA D3 black and white globe renderer that uses HTML5 Canvas.
See also these awesome derivatives:
- Map & Globe with Rectangle by @tyrasd
- visualizing map distortion by @enjalot
forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/01aa2685f083b6c1b9fb'>Map & Globe</a>