Random Random

Country Maps

Earth Loading

Loading Map


Generate maps for all of the individual countries and major territories of the world along with their associated subdivisions.

<!doctype html>



<title>Country Map</title>

<script src="https://sabalico.dev/cartography/scripts/d3.js"></script>

<script src="https://sabalico.dev/cartography/scripts/d3-topojson.js"></script>

<script src="https://sabalico.dev/cartography/datamaps/hti.min.js"></script>



<div id="map" style="display: block; width: 100%; max-width: 900px; min-height: 500px; overflow: hidden;"></div>


var map = new Datamap({

element: document.getElementById('map'),

scope: 'hti',

setProjection: function(element) {

var projection = d3.geo.mercator()

.center([-73, 18.971187])

.rotate([0, 0])


.translate([element.offsetWidth / 2, element.offsetHeight / 2]);

var path = d3.geo.path()


return {path: path, projection: projection};






Code Copied!