如何将自定义样式中的 makis 与 Mapbox Studio 中的 poi-label 相关联?

How do I associate makis in a custom style with a poi-label in Mapbox Studio?

我正在 Mapbox Studio 中从头开始创建样式。我有一个按数据过滤的 poi-label 层。我可以看到过滤器的工作原理。我可以在 poi 的位置放置一个文本标签,这一切都在 Mapbox Studio 中。

终其一生,我都无法显示带文字的图标。我试图将 Maki 图标集中的 some_maki.svg 粘贴到 "Icon image" 字段中。 THE cursor 表示粘贴是一个有效的操作,图片上传了,但是没有在地图上显示。给出了什么?

Maki icon set provides each icon in two SVG sizes: 11px by 11px and 15px by 15px. So, when you use the name of a particular Maki icon in the 'icon-image' 布局 属性,您还需要在图标名称后附加 -11-15

例如,在 Mapbox Studio 中检查时,考虑默认 Mapbox Street 样式中 poi-label 层的 'icon-image'

因此,如果您在图标图像公式中包含 & "-11"& "-15",并且引用的图标包含在样式的 sprite sheet, the icons should show up as expected. You can add and remove image's in your style's sprite with the image toolbar, as described in the documentation here 中。