从mapbox-gl.js中删除了default_marker [英] Was default_marker removed from mapbox-gl.js

查看:247
本文介绍了从mapbox-gl.js中删除了default_marker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在mapbox-gl.js中使用default_marker和/或secondary_marker,但是看来它们已从street-v9(可能也是v8)的sprite.json中删除.我在street-v7中找到了一个可行的示例,其中它们是sprite.json/sprit.png的一部分,但现在不存在了.

如何退回这些物品?或者新的替代品是什么?我经历了新的sprint.png,但看不到任何类似的东西.

解决方案

致歉,ongle!我们最近努力对图标进行标准化 根据本指南上载您自己的标记图像. /p>

I am trying to use the default_marker and/or secondary_marker in mapbox-gl.js however it appears they have been removed from the sprite.json in streets-v9 (probably v8 too). I've found a working example in streets-v7 where they were part of the sprite.json/sprit.png, but they are gone now.

How can I get these back or what is the new replacement? I've gone through the new sprint.png but I don't see anything similar.

解决方案

Apologies for the change, ongle! We've recently worked to standardize the icons available across all the Mapbox styles which, unfortunately, required some breaking changes.

The closest replacement to default_marker is marker-15. The appearance of this marker will be different per style.

You may also choose to upload your own marker image per this guide.

这篇关于从mapbox-gl.js中删除了default_marker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆