Jiren
Posts: 18
Joined: Tue Aug 15, 2023 7:10 am

Map doesn't show up (GeoJSON)

So, I'm using this line 'Highcharts.getJSON(JSON, function)' to get my map. The thing is: one GeoJSON works and the other doesn't
Here is the first GeoJSON (works):
https://pastebin.com/i27B9Npg
And this doesn't work:
https://pastebin.com/E0ErTWdL

What's the difference and how to fix this?
jakub.s
Posts: 1075
Joined: Fri Dec 16, 2022 11:45 am

Re: Map doesn't show up (GeoJSON)

Hi,

Welcome to our forum & thanks for the question!

Unfortunately, it's difficult to tell what's wrong with a GeoJSON file as it has many lines and thousands of properties that should be analyzed.

We have already prepared a set of GeoJSON and TopoJSON maps that can be used with Highcharts Maps with no problems: https://code.highcharts.com/mapdata/

If you're trying to find out what's wrong with your GeoJSON you could try to compare it with one of the maps that we've included in the resource above.

It's highly unlikely that Highcharts Maps does not work with a proper GeoJSON file, but if it does - please report it here or on our GitHub repository with a minimal demo in JSFiddle.

Best regards!
Jakub
Highcharts Developer

Return to “Highcharts Maps”