This branch will have everything what the mapbox has but extended to show some shapes within the markers like in the image below:
Just add the shape
and shapeColor
properties for each of your marker and you are ready to rock.
For example:
{
type: 'Feature',
properties: {
shape: 'triangle',
shapeColor: '#fff',
color: '#ddd' // Color of the circle
},
geometry: {
type: 'Point',
coordinates: []
}
Available shapes are: circle
, diamond
, triangle
, square
, star
, invTriangle
Also important that the color of the circle is read from the properties like this (otherwise the shapes will not work):
map.addLayer({
id: "layerId",
type: "circle",
source: "layerSource",
paint: {
'circle-color': ['get', 'color']
},
});