Sample code to make an animated globe with d3 on canvas. Borrowing heavily from /mbostock/4183330
The plane flies from startCountry
to endCountry
, and you can rotate the globe around once the animation is done
xxxxxxxxxx
<html lang="en">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://d3js.org/topojson.v1.min.js"></script>
<script src="https://d3js.org/queue.v1.min.js"></script>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div class="container-fluid map-container">
<div class="row">
<div class="col-md-12" id="globeParent">
<div style="display:none;">
<img id="plane" src="plane-2_03-black.png">
</div>
</div>
</div>
</div>
<script src="globe.js"></script>
</body>
</html>
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js
https://code.jquery.com/jquery-1.11.3.min.js
https://d3js.org/topojson.v1.min.js
https://d3js.org/queue.v1.min.js