Why does GeoJSON map looks stretched in Highmaps for WSG84?

1k Views Asked by At

I am trying to migrate a map (used Polymaps so far) to Highmaps. If I use the world map provided from the Highmaps collection (which is EPSG: 102014, unusual coordinates), everything looks fine. If I use a GeoJSON file that comes in the WSG84 (EPSG: 4326) format, then all the shapes look horizontally stretched.

The solution that I used for some maps was to simply grab a GeoJSON file in the format that Highmaps likes, but for this particular case it's not possible.

Expected result

What I actually get

What I tried so far is converting the original GeoJSON from EPSG 4326 to EPSG 102014, but it still looked bad. Is there any way I can make that original GeoJSON look good on Highmaps?

1

There are 1 best solutions below

1
On

I had the same problem with the EPGS4326 (WGS84) so I reprojected my geojson to EPGS3857 (web mercator) and in highmaps looks right.

In their web they have an example that use the proj4js library to reproject on the fly, but I not been able to make it work to transform from 4326 to 3857, so I reproject the original geojson.

The transform is supposed to work including this on the geojson:

"hc-transform": {
    "default": {
        "crs": "Your map projection in proj4 string format, as supported by pro4js"
    }
}