我在一个angular项目中使用mapbox-gl sdk,无论我尝试什么,我在github'sprites'文件夹中找到的所有可能的主题的图标,除了'火箭-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. 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
}
});