提交 93c23192 编写于 作者: 冬至@'s avatar 冬至@

修改语法问题

上级 349a510e
......@@ -375,10 +375,28 @@ App nvue 3.6.9+ 支持
const markers = []
positions.forEach((p, i) => {
const newMarker = Object.assign({},marker, p)
newMarker.id = i + 1
newMarker.label.content = `label ${i + 1}`
markers.push(newMarker)
console.log(i)
markers.push({
latitude: p.latitude,
longitude: p.longitude,
id: i + 1,
iconPath: img,
width: 50,
height: 50,
joinCluster: true, // 指定了该参数才会参与聚合
label: {
width: 50,
height: 30,
borderWidth: 1,
borderRadius: 10,
bgColor: '#ffffff',
content: i + ""
}
})
// const newMarker = Object.assign({},marker, p)
// newMarker.id = i + 1
// newMarker.label.content = `label ${i + 1}`
// markers.push(newMarker)
})
this._mapContext.addMarkers({
markers,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册