Mapbox 使用哪个投影

Which projection is Mapbox using

我有 UTM 个坐标,EPSG: 25833。 查看 Mapbox documentation 它说

Mapbox supports the popular Web Mercator projection, and does not support any other projections. Web Mercator is a nearly conformal projection that is adopted by the vast majority of web maps and its use allows you to combine Mapbox's maps with other layers in the same projection.

Commonly this projection is referred to as EPSG:900913 or EPSG:3857. See epsg.io for more information and alternative encodings.

所以,我可能必须将 UTM 坐标转换为 Web Mercator。 我使用 proj4js 库来做到这一点。

import proj4 from 'proj4';
const epsg25833 = require('epsg-index/s/25833.json');
const epsg3857 = require('epsg-index/s/3857.json');
const mapboxCoords = proj4(epsg25833.proj4, epsg3857.proj4, [point.utm_point.coordinates[0], point.utm_point.coordinates[1]]);

如果我尝试在 Mapbox Map 上显示 mapboxCoords,则不会显示任何内容。 但是,如果我将坐标转换为 EPSG: 4326,则会显示所有内容。不过可能坐标有点偏差

import proj4 from 'proj4';
const epsg25833 = require('epsg-index/s/25833.json');
const epsg4326 = require('epsg-index/s/4326.json');
const mapboxCoords = proj4(epsg25833.proj4, epsg4326.proj4, [point.utm_point.coordinates[0], point.utm_point.coordinates[1]]);

使用 Mapbox 的正确投影是什么?文档说它是 EPSG:3857,但是,当我将我的坐标转换成那个 EPSG 时,什么也没有显示。使用 EPSG: 4326 至少显示一些东西...

使用 Mapbox 的地图库,如 Mapbox GL JS 和 Mapbox GL Native,地图在 Web Mercator Projection (EPSG:3857) 中可视化呈现,但是任何时候您想要传递数据以显示在这些地图上,无论是作为标记或 GeoJSON 层然后该数据必须作为 WGS84 LL 传递,即。 EPSG:4326.

Mapbox 支持流行的 Web 墨卡托投影,通常称为 EPSG:900913 或 EPSG:3857。

Mapbox 文档link 供参考: