Skip to main content
100%

Map & Globe

✓ Published0🌍 Public
PPatrick Wojda
Last edited Jan 17, 2020
Created on Apr 9, 2019

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 description

Pan 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

  • layout A plugin for nested box layout of arbitrary components.

  • links A plugin for data binding. This links the pan and zoom between the globe and the map.

  • leaflet A Leaflet-based geographic map component.

  • globe A D3 black and white globe renderer that uses HTML5 Canvas.

See also these awesome derivatives:

<!-- Start of SimpleHitCounter Code --> <div align="center"><a href="http://www.simplehitcounter.com" target="_blank"><img src="http://simplehitcounter.com/hit.php?uid=1948655&f=16777215&b=0" border="0" height="18" width="83" alt="web counter"></a></div> <!-- End of SimpleHitCounter Code -->

forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/01aa2685f083b6c1b9fb'>Map & Globe</a>

mit Licensed

Similar vizzes