Alnitam
Posts: 5
Joined: Mon Nov 15, 2021 1:50 pm

Unable to translate part of the GeoJSON

Hello,
I use data from https://code.highcharts.com/mapdata/cou ... l.geo.json and it works fine. But it lacks some «départements» and the projection used (EPSG:2192) is deprecated. So I decided to update it for my needs.
I managed to automatically generate the entire file. The main part of France is projected with EPSG 2154. Oversea «départements» have their own projection. All appear on the same map.

The problem is when I want to translate oversea zones in order to have a nicer view as done in the original GeoJSON. I struggled quite some time with Google and ChatGPT but unfortunately, I don't understand the hc-transform part of the GeoJSON file. Can you help me ?

Here is an exemple : https://jsfiddle.net/yg635u2r/1/
There is France and only one oversea «département» (La Réunion) appearing on the top (which is it's normal position according to its own projection EPSG 2975).
Thanks a lot.
User avatar
dawid.d
Posts: 897
Joined: Thu Oct 06, 2022 11:31 am

Re: Unable to translate part of the GeoJSON

Hello,

Thanks for the question!

Have you considered using TopoJSON instead? This is a newer standard than GeoJSON, supported by Highcharts Maps. See: https://www.highcharts.com/blog/tutoria ... json-maps/

Demo: https://jsfiddle.net/gh/get/jquery/1.11 ... fr-all-all

If I may clarify any issues/matters I am available at your convenience.
Best regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Maps”