我想按线做一个曲线,但代码不起作用。我使用 Turf.js 制作贝塞尔线。
var line = {
"type": "Feature",
"properties": {
"stroke": "#f00"
},
"geometry": {
"type": "LineString",
"coordinates": [
[-76.091308, 18.427501],
[-76.695556, 18.729501],
[-76.552734, 19.40443],
[-74.61914, 19.134789],
[-73.652343, 20.07657],
[-73.157958, 20.210656]
]
}
};
var curved = turf.bezier(line);
var bg = new Graphic(curved, basicSymbol, {}, null);
graphicsLayer.add(bg);
难道我做错了什么?