【发布时间】:2020-11-10 22:39:27
【问题描述】:
如果你只是添加一个标记,你会得到一个标准标记:
https://docs.mapbox.com/mapbox-gl-js/example/add-a-marker/
如果您使用 addLayer(),似乎没有任何关于如何使用这些标准标记的描述:
https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#symbol
map.addLayer({
'id': 'POIs',
'type': 'symbol',
'source': 'POIs',
'layout': {
'icon-image': 'marker-15', // this is a custom image... I just want a default, normal marker
'icon-allow-overlap': true
}
});
添加特殊符号真的很容易,但我只想要默认标记。 如何使用 addLayer() 完成此操作
【问题讨论】:
标签: mapbox-gl-js