Tomasz Jeznach Tomasz Jeznach - 1 year ago 63
Javascript Question

Datamap isn't showing map

I used the following repository

This is the code:

<script src="//"></script>
<script src="//"></script>
<script src="dist/datamaps.all.min.js"></script>
<div id="container" style="position: relative; width: 500px; height: 300px;"></div>

var map = new Datamap({
element: document.getElementById('container'),
scope: 'pol'

When I change the scope to "usa" the browser shows me a map of the USA.
But when I put "pol" there is nothing...
In the datamaps.all.min.js "pol" is contained...
Other maps don't work either... Only US

Does someone know what's wrong?

Answer Source

datamaps.all.min.js shows only usa-only map as per this link

For showing world map, you need to use this script during initial import

For poland Map, try this script URL instead