Mapbox gl除了'火箭'之外,无法让任何图标与'light-v10'一起工作。

问题描述 投票:2回答:1

我在一个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
        }
      });
mapbox mapbox-gl-js mapbox-gl mapbox-marker
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.