AmCharts - AmMap with custom map shows upside down
http://stackoverflow.com/questions/25302351/amcharts-ammap-with-custom-map-shows-upside-down
by Ben Smith
HTML
<script src="http://www.ammap.com/lib/3/ammap.js"></script>
<div id="mapdiv" style="width: 100%; height: 370px;"></div>
JavaScript
AmCharts.ready(function() {
map = new AmCharts.AmMap();
map.pathToImages = "http://www.ammap.com/lib/3/images/";
//map.panEventsEnabled = true; // this line enables pinch-zooming and dragging on touch devices
map.balloon.color = "#000000";
var dataProvider = {
mapVar: AmCharts.maps.UK,
getAreasFromMap: true
};
map.dataProvider = dataProvider;
map.write("mapdiv");
$('svg g:nth-child(8)').attr('transform','matrix(1 0 0 -1 0 370)');
});
AmCharts.maps.UK = {
"svg": {
"defs": {
"amcharts:ammap": {
"projection": "mercator",
"leftLongitude": "-10.476361",
"topLatitude": "60.846142",
"rightLongitude": "1.765083",
"bottomLatitude": "49.162600"
}
},
"g": {
"path": [
{
"id": "17",
"title": "Channel Islands",
"d": "M-150615.91190074864 5452709.590819483 L-150666.76 5452748.88 L-153258.08400984394 5452824.925347839 L-156044.64 5452906.7 L-161136.6 5451833.35 L-159725.68 5461803.25 L-149816.71 5460286.9 L-146886.85307766203 5458456.066711629 L-145318.37 5457475.94 L-144844.74 5451850.87 L-148038.38 5450717.99 Z M-180987.72275064027 5484820.6954792375 L-182100.11147078898 5481912.983833509 L-182594.1 5480621.73 L-185079.3917713327 5481659.394072024 L-186566.94251669702 5482280.479282856 L-189070.86 5483325.92 L-189511.27 5485265.74 L-188850.790562919 5485613.731295892 L-186059.499499588 5487084.397814492 L-181919.78 5489265.52 L-181405.96552786694 5489236.572563123 L-180398.08 5489179.79 L-179828.66 5487850.41 Z"
},
{
"id": "18",
"title": "England",
"d": "M44191.69070724073 5710392.89666802 L40644.48 5710163.9 L35333.886278994316 5708277.306464998 L34753.18 5708071.01 L30787.518270426404 5705273.882597301...