我正在尝试使用'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 / v4 / marker / pin-m-99 + AA0000.png?access_token = pk.eyJ1IjoibWFwYm94IiwiYSI6IlhHVkZmaW8ifQ.hAMX5hSW-QnTeRCMAy9A8Q
pin-m-99+AA0000.png: api.tiles.mapbox/v4/marker/pin-m-99+AA0000.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6IlhHVkZmaW8ifQ.hAMX5hSW-QnTeRCMAy9A8Q
pin -m-100 + AA0000.png: api.tiles.mapbox/v4/marker/pin-m-100+AA0000.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6IlhHVkZmaW8ifQ.hAMX5hSW-QnTeRCMAy9A8Q
pin-m-100+AA0000.png: api.tiles.mapbox/v4/marker/pin-m-100+AA0000.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6IlhHVkZmaW8ifQ.hAMX5hSW-QnTeRCMAy9A8Q
更多推荐
Mapbox标记符号与三个数字
发布评论