首页 > 解决方案 > 在 mapbox 样式上添加 openweathermap png 平铺层

问题描述

我正在尝试在 mapbox 地图样式上实现来自https://openweathermap.org/api/weathermaps的 openweathermap 地图天气图层,但我不知道将图像平铺源放在 json 文件中的哪个位置。我可以帮忙吗?谢谢你。我正在为 Qt 使用 Mapbox,这是我的代码,我正在为 Qt 使用 Mapbox 地图,这是我的 QML 代码

   MapParameter {
                id: source
                type: "source"
                property var name: "weatherSource"
                property var sourceType: "raster"
                property var url: "https://tile.openweathermap.org/"
property var tiles:  
["https://tile.openweathermap.org/map/clouds_new/{z}/{x}/{y}.png?appid=API_ID"]
                property var tileSize: 256
                property var scheme: "xyz"
                property var minzoom: 4.0
                property var maxzoom: 20.0}
   MapParameter {
                type: "layer"
                property var name: "wind_weather"
                property var layerType: "raster"
                property var source: "weatherSource"}

标签: qtstylesmapboxopenweathermap

解决方案


尚未实现对源“tiles”属性的支持。我将在https://bugreports.qt.io中针对此功能请求开一张票 - 谢谢!


推荐阅读