-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?

Community
  • 1
  • 1
El Kopyto
  • 1,157
  • 3
  • 18
  • 33

1 Answers1

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/

zeroin
  • 5,863
  • 6
  • 31
  • 42
  • Very nice. Is there a way to create the map at county-level resolution? Thanks! – shiri Oct 10 '16 at 15:01
  • I was able to create a map at county-level resolution using datawrapper.de, as described in this link: https://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 Jan 09 '17 at 12:46