问题描述
在我更改地图样式时,出现“在MapBox Web应用程序中使用路线”的问题。这个问题已在github中问到,但尚未得到解决。 (从2018年开始)希望到目前为止,对于这种情况的发生原因,有一种解决方案。
如果使用已渲染的方向更改地图样式,则最终会得到:Error: The layer 'directions-route-line-alt' does not exist in the map's style and cannot be queried for features.
(来自github问题-下面的链接)
本示例是根据以下示例生成的:https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-directions/
Example of issue:
https://plnkr.co/edit/M8mj1WTH1KjDa1dhiUKw?p=preview&preview
Git hub原始帖子: https://github.com/mapbox/mapbox-gl-js/issues/7019
我的代码: https://github.com/juanmguevara/MapBoxMapping
感谢您的帮助!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)