-1

I tried to create a regional map of UK regions, and hoped to use Google charts which I've used reliably before. Unfortunately, as described in this question, Google charts only covers U.S. states and no other regional data. Is there a different way to create such a map?

1 Answer 1

2

You can have UK regions map made with amMap:

HTML:

<script src="http://www.ammap.com/lib/3/ammap.js" type="text/javascript"></script>
<script src="http://www.ammap.com/lib/3/maps/js/unitedKingdomLow.js" type="text/javascript"></script>
<div id="mapdiv" style="width: 100%; height: 370px;"></div>

JavaScript:

var map;

AmCharts.ready(function() {
    map = new AmCharts.AmMap();
    map.pathToImages = "http://www.ammap.com/lib/3/images/";
    map.panEventsEnabled = true; 
    map.balloon.color = "#000000";

    var dataProvider = {
        mapVar: AmCharts.maps.unitedKingdomLow,
        getAreasFromMap: true
    };

    map.dataProvider = dataProvider;

    map.areasSettings = {
        autoZoom: true,
        selectedColor: "#CC0000",
        outlineThickness:2
    };

    map.smallMap = new AmCharts.SmallMap();

    map.write("mapdiv");

});

Disclaimer: I am the author of amMap tool. Fiddle: http://jsfiddle.net/amcharts/PN2m8/

2
  • Very nice. Is there a way to create the map at county-level resolution? Thanks!
    – shiri
    Commented Oct 10, 2016 at 15:01
  • I was able to create a map at county-level resolution using datawrapper.de, as described in this link: academy.datawrapper.de/create-brexit-maps-917486.html . Unfortunately, I can't reopen the question even though I've edited it to better fit the SO guidelines. I'm adding this link here, for the benefit of other users who get to this page via Google (as I did).
    – shiri
    Commented Jan 9, 2017 at 12:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.