Mapbox标记符号与三个数字 [英] Mapbox Marker Symbol with Three Digits

查看:327
本文介绍了Mapbox标记符号与三个数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用'marker-symbol'标记带有两位和三位数ID的标准Mapbox标记。两位数的标记效果很好,如下所示,但是当我尝试包括三个数字,即112时,标记不会显示在地图上。有没有一种简单的方法可以使用内置标记执行此操作而不创建自定义div标记?

I'm trying to label the standard Mapbox markers with two- and three-digit ids using 'marker-symbol'. The two-digit markers work well, as seen below, but when I try to include three digits, i.e. 112, the markers do not display on the map. Is there an easy way to do this with the built-in marker and not creating a custom div marker?

推荐答案

不好意思说,没有简单的方法做这个。没有内置标记。这些标记只是从Mapbox服务器加载的图像。它们最多存在99号。数字100不存在,你可以自己检查:

Sorry to say, there is no easy way to do this. Not with the built-in marker. Those markers are just images which get loaded from the Mapbox server. They exist up to number 99. Number 100 does not exist, you can check for yourself:

pin-m-99 + AA0000.png:
https:// api .tiles.mapbox.com / v4 / marker / pin-m-99 + AA0000.png?access_token = pk.eyJ1IjoibWFwYm94IiwiYSI6IlhHVkZmaW8ifQ.hAMX5hSW-QnTeRCMAy9A8Q

pin-m-99+AA0000.png: https://api.tiles.mapbox.com/v4/marker/pin-m-99+AA0000.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6IlhHVkZmaW8ifQ.hAMX5hSW-QnTeRCMAy9A8Q

pin -m-100 + AA0000.png:
https://api.tiles.mapbox.com/v4/marker/pin-m-100+AA0000.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6IlhHVkZmaW8ifQ.hAMX5hSW-QnTeRCMAy9A8Q

pin-m-100+AA0000.png: https://api.tiles.mapbox.com/v4/marker/pin-m-100+AA0000.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6IlhHVkZmaW8ifQ.hAMX5hSW-QnTeRCMAy9A8Q

这篇关于Mapbox标记符号与三个数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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