Mapbox gl无法获取任何图标来使用';轻型v10';除';火箭';
我在一个angular项目中使用了主mapbox gl sdk,无论我在尝试什么,我在github“sprites”文件夹中找到的所有可能主题的图标,除了“rocket-15”这个奇怪的图标外,它们都不起作用。我总是打一个:Mapbox gl无法获取任何图标来使用';轻型v10';除';火箭';,mapbox,mapbox-gl-js,mapbox-gl,mapbox-marker,Mapbox,Mapbox Gl Js,Mapbox Gl,Mapbox Marker,我在一个angular项目中使用了主mapbox gl sdk,无论我在尝试什么,我在github“sprites”文件夹中找到的所有可能主题的图标,除了“rocket-15”这个奇怪的图标外,它们都不起作用。我总是打一个: Image "star-11" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style.
Image "star-11" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.
我的配置:
this.map.addLayer({
id: 'uprnsites',
source: 'uprnsites',
type: 'symbol',
layout: {
'text-size': 19,
'text-transform': 'uppercase',
'text-offset': [0, 1.5],
'icon-image': 'star-11',
'icon-size': 3,
'icon-text-fit': 'none',
'icon-text-fit-padding': [25, 25, 25, 25],
'text-field': '{postcode} | {addressLine1} | {UPRN}'
},
paint: {
'text-color': '#000',
'text-halo-color': '#fff',
'text-halo-width': 2
}
});
如果您使用的是light-v10,您应该能够使用任何附带的精灵@Andrewarvey无法访问该链接:(即使在链接中粘贴了我在生产中使用的访问密钥后,它们是否在任何地方都可用?添加访问令牌后,它应该会起作用。或者,您可以将样式作为新样式添加到Mapbox帐户中,然后在Mapbox Studio中打开图像,以查看哪些确切的图标预构建到样式中。它“应该”但没有。