We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addMarkerCircle(latitude, longitude) { const marker = { id: this.markLength, // 确保 ID 唯一 latitude: latitude, longitude: longitude, width: 20, height: 25 }; // 动态更新 markerList this.markerList.push(marker); this.mapContext.addMarkers({ markers: [marker], clear: true, success: () => { uni.showToast({ title: `添加标记成功`, icon: 'none' }); this.typeDetail = true; this.djDetail.lng = longitude; this.djDetail.lat = latitude; this.djDetail.shape = 0; }, fail: (err) => { console.error("Failed to add marker:", err); } }); }, onShow() { this.initForm() //获取当前定位 this.getLocation() this.mapContext = uni.createMapContext('map', this); },
<map style="width:100%;height:100%;" id="map" ref="mapRef" :latitude="latitude" :longitude="longitude" :scale="scale" :show-location="true" :markers="markerList" :polygons="polygons" :circles="circles" @updated="bindtap()"> </map>
还有什么其他办法,能够调用后,标记成一个点markerList,在地图上展示就好
The text was updated successfully, but these errors were encountered:
No branches or pull requests
还有什么其他办法,能够调用后,标记成一个点markerList,在地图上展示就好
The text was updated successfully, but these errors were encountered: