mapbox-developer-group / Mapbox-Tech-Q-A

在提问之前请自行查看文档哦,养成好习惯:https://docs.mapbox.com/
32 stars 1 forks source link

自定义的图层通过Mapbox-iOS-SDK加载显示不完整 #29

Closed haopf closed 4 years ago

haopf commented 4 years ago

我遇到的问题

我自定义的图层在iOS上加载,经常显示不完整。

自定义的数据由geojson通过tippecanoe生成mbtiles,用tileserver-gl加载看数据一切正常。

我的图层定义如下:

"sources": {
    "mapbox_streets": {
      "type": "raster",
      "url": "mapbox://mapbox.streets",
      "tileSize": 256
    },
    "121": {
      "type": "vector",
      "tiles": [
        "http://xx.xx.xx.xx.:xxx/data/121/{z}/{x}/{y}.pbf"
      ]
    }
  },
  "layers": [
    {
      "id": "simple-tiles",
      "type": "raster",
      "source": "mapbox_streets"
    },
    {
      "id": "nations",
      "type": "fill",
      "source": "121",
      "source-layer": "121",
      "minzoom": 0,
      "maxzoom": 12,
      "paint": {
        "fill-color": "#ff0000",
        "fill-opacity": 0.5
      }
    }
  ]
}

但是通过iOS加载后, 经常加载自定义图层显示不完整。

我遇到的问题截图

该问题的类别

iOS

haopf commented 4 years ago

因为图层定义的字体不完整导致的。