diff --git a/docs/api/location/map.md b/docs/api/location/map.md index b18d6c121ef84079e1cc58e0b76055fae2cd0b51..fa69311bd619f4daf39c5aad5c50ccc5b2b9c119 100644 --- a/docs/api/location/map.md +++ b/docs/api/location/map.md @@ -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,