dorsulak
Posts: 2
Joined: Thu Dec 29, 2022 3:09 pm

World map groups with seperated US states

I am implementing a world map view, something like this:

http://jsfiddle.net/9Ljo1ms8/

The map will assign each country to one of the groups and make each group a different color.

This works fine, however, now I need to seperate US Alaska and Hawaii into a differnt group than the rest of the US. Is this possible? How can I acheive this?
dorsulak
Posts: 2
Joined: Thu Dec 29, 2022 3:09 pm

Re: World map groups with seperated US states

Ok after hours of figuring out this stuff I found a way.

Aparrently it is possible to combine maps now in highcharts, however I was unable to get it to work for my exact usecase. The feature seems to require topo maps and it just didnt look right:
https://jsfiddle.net/dorsulak1/me83p2cs/1/


What did work for me was creating a custom map.

This is not an easy process for a first time user. It took me a full day to understand what to do and accomplish the task.

Basically you need to download QGIS, familiarize yourself with all its processes, copy geo.json from highchart lib into it. Add a clipping mask for alaska and hawaii (and figure out how to troubshoot qgis clipping errors), merge clipping layers, and export as new geo.json.

My geo.json is pasted into following example as variable due to attachment limitations.


Final, working solution:
http://jsfiddle.net/dorsulak1/y816saz7/4/
User avatar
dawid.d
Posts: 807
Joined: Thu Oct 06, 2022 11:31 am

Re: World map groups with seperated US states

Hi,

Welcome to our forum and thanks for contacting us!

I'm glad you solved your problem and thanks for sharing the solution with others!

​If you have further inquiries, you may reach out to me at any time.
Best regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Maps”