Mapbox iOS - 矢量瓦片投影

问题描述

mapBox ios sdk 版本 6.2.1

您好,我正在尝试在 mapBox显示矢量切片图层,但我无法让它显示在正确的位置。

我像这样添加火层:

let source = MGLVectorTileSource(identifier: "VIirs_NOAA20_Thermal_Anomalies_375m_All",tileURLTemplates: ["https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/VIirs_NOAA20_Thermal_Anomalies_375m_All/default/2021-03-02/500m/{z}/{y}/{x}.mvt"],options: nil)
style.addSource(source)

let layer = MGLCircleStyleLayer(identifier: "VIirs_NOAA20_Thermal_Anomalies_375m_All_v2_NRT",source: source)
layer.sourceLayerIdentifier = "VIirs_NOAA20_Thermal_Anomalies_375m_All_v2_NRT"
layer.circleRadius = NSExpression(forConstantValue: 2)
layer.circleColor = NSExpression(forConstantValue: UIColor.red)
style.addLayer(layer)

它已显示,但位置错误。移到右侧和顶部。

enter image description here

知道出了什么问题吗?谢谢

编辑:似乎问题在于 MapBox 使用 epsg:3857 投影,但来自服务器的矢量切片使用 epsg:4326 投影。有什么方法可以在客户端转换它吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...