我正在使用mapbox animation marker。
map.on('load', function() {
map.addImage('pulsing-dot', pulsingDot, { pixelRatio: 2 });
map.addSource('points', {
'type': 'geojson',
'data': {
'type': 'FeatureCollection',
'features': [
{
'type': 'Feature',
'geometry': {
'type': 'Point',
'coordinates': [0, 0]
}
}
]
}
});
map.addLayer({
'id': 'points',
'type': 'symbol',
'source': 'points',
'layout': {
'icon-image': 'pulsing-dot'
}
});
});
我想使用for循环按国家(地区)的纬度和经度添加多个标记。 Full source code。