以高缩放级别显示Mapbox轨迹

时间:2018-06-07 21:33:42

标签: ios json mapbox mapbox-gl

我在iOS上使用Mapbox GL native并希望显示从缩放级别10开始的路径。我正在使用在线编辑器进行测试:

http://editor.openmaptiles.org/#14.16/45.75119/-122.21562

无论我为线宽停止或甚至最小缩放级别更改了什么值,它是否会在缩放级别14之前显示跟踪。

{
  "id": "road_path",
  "type": "line",
  "source": "openmaptiles",
  "source-layer": "transportation",
  "filter": [
    "all",
    [
      "==",
      "$type",
      "LineString"
    ],
    [
      "in",
      "class",
      "path",
      "track"
    ]
  ],
  "layout": {
    "line-cap": "square",
    "line-join": "bevel"
  },
  "paint": {
    "line-color": "hsl(0, 0%, 97%)",
    "line-dasharray": [
      1,
      1
    ],
    "line-width": {
      "base": 1.55,
      "stops": [
        [
          4,
          0.25
        ],
        [
          20,
          10
        ]
      ]
    }
  }
}

我何时需要开始在缩放级别10上看到路径?

0 个答案:

没有答案