mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.09k stars 2.21k forks source link

How to display undistorted vector data around poles #12460

Open jakub-m opened 1 year ago

jakub-m commented 1 year ago

mapbox-gl-js version: 2.11.0

Question

How to display undistorted vector data around poles? Ideally I would like to display raster tiles or MVT tiles or GeoJSON around poles. I know that with tiles (neither vector no raster) it is not possible because of limitations of web-mercator that tiles assume. The tiles use "slippy tile" indexing scheme, which in turn assumes web-mercator projection, which does not work above 85 (below -85) latitude).

But GeoJSON layer do not have the constraints of tiles. Sadly, when I try to render anything around poles, I get distorted results (similarly as in this bug)

Examples of distortions near poles (based on this example):

image (2) image (1) image

Links to related documentation

alexaac commented 11 months ago

Hi @jakub-m, I have the same issue with Antarctica. In this demo, the data was projected to EPSG:4326 before loading, because is the only projection that somewhat fits the GeoJSON where it should be.

Have you found a workaround until now?

south_pole_bug

jakub-m commented 7 months ago

@alexaac Hi, sorry for terribly late reply. No, I didn't manage to find a workaround.