使用最新的[email protected]版本API,绘制气象风矢图:
var icon = L.WindBarb.icon({deg: 180, speed:16,pointRadius:0,strokeColor:'#ce3431'}); var marker = L.marker(31,121], {icon: icon}).addTo(map).on('click', markerOnClick);
options: {
pointRadius: 4,
pointColor:'#2B85C7',
pointStroke:'#111',
strokeWidth: 2,
strokeColor:'#000',
strokeLength: 12,
barbSpaceing: 4,
barbHeight: 10,
forceDir: false
}