我正在将一个网络应用程序从Mapbox.js重写为Mapbox GL js。使用标准的'mapbox://styles/mapbox/streets-v8'样式,我在哪里可以找到所有有效的标记图标列表?
这是我的代码:
m.map.addSource("markers", {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": ["-75.532965", "35.248018"]
},
"properties": {
"title": "Start",
"marker-symbol": "entrance",
"marker-size": "small",
"marker-color": "#D90008"
}
}
}
});
m.map.addLayer({
"id": "markers",
"type": "symbol",
"source": "markers",
"layout": {
"icon-image": "{marker-symbol}-15", //but monument-15 works
"text-field": "{title}",
"text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
"text-offset": [0, -1.6],
"text-anchor": "top"
}
});
我读到所有的Maki图标应该为没有默认图标的样式提供: https://github.com/mapbox/mapbox-gl-styles/issues/241 但是大部分都不能用。 另外还有一个问题是大小——对于Maki它们的尺寸是-small,-medium和-large,现在我看到了-11和-15。
我只需要使用一些基本的标记图标。