Random Random

Country Maps

Earth Loading

Loading Map

Description:

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

<!doctype html>

<html>

<head>

<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/sjm.min.js"></script>

</head>

<body>

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

<script>

var map = new Datamap({

element: document.getElementById('map'),

scope: 'sjm',

setProjection: function(element) {

var projection = d3.geo.mercator()

.center([23.670272, 77.553604])

.rotate([0, 0])

.scale(1500)

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

var path = d3.geo.path()

.projection(projection);

return {path: path, projection: projection};

},

});

</script>

</body>

</html>

Code Copied!