0

I am currently making an interactive map using amCharts 4. Having an issue with Russia wrapping around the chart div. I am intending on creating popups when certain areas of the map are clicked, and can see the bit of Russia that is overhanging on the left being an issue as the popup will load in an unusual position.

In previous versions of amCharts, it appears that the map did not wrap around, but in v4 it does. I have tried locating alternative shapefiles/geoJSON, but have been unable to get any of them to work (despite following the tutorial on exporting from mapshaper on the amcharts site).

Is there a setting to stop the map wrapping around, or an alternative to the worldLow.js map that can be used?

enter image description here

1 Answers1

0

After much searching, it turns out there is already a setting for this in amCharts, but the tutorial about it wasn't that easy to find on the amCharts site:

https://www.amcharts.com/docs/v4/tutorials/fixing-maps-for-countries-that-span-180-longitude/

"The solution is easy: we just need to "rotate" the map so that "stray" islands fit next to the mainland.

For that we have deltaLongitude setting of the map."

chart.deltaLongitude = -10;

This solved the problem with some playing around to get the delta correct.