Skip to content

Commit 5c849d6

Browse files
committed
update: map API 增加事件
1 parent e83b052 commit 5c849d6

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

pages/API/map/map.nvue

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
:show-location="showLocation" :enable-3D="enable3D" :rotate="rotate" :skew="skew" :show-compass="showCompass"
55
:enable-overlooking="enableOverlooking" :enable-zoom="enableZoom" :enable-scroll="enableScroll"
66
:enable-rotate="enableRotate" :enable-satellite="enableSatellite" :enable-traffic="enableTraffic" :markers="markers"
7-
:polyline="polyline" :circles="circles" :polygons="polygons" :include-points="includePoints"></map>
7+
:polyline="polyline" :circles="circles" :polygons="polygons" :include-points="includePoints"
8+
@tap="maptap" @controltap="oncontroltap" @markertap="onmarkertap" @callouttap="oncallouttap" @poitap="onpoitap" @updated="onupdated" @regionchange="onregionchange"></map>
89
<scroll-view class="scrollview" scroll-y="true">
910
<!-- <view class="list-item">
1011
<text class="list-text">显示3D楼块</text>
@@ -355,37 +356,33 @@
355356
})
356357
});
357358
},
358-
bindtap(e) {
359+
maptap(e) {
359360
uni.showModal({
360361
content: JSON.stringify(e)
361362
})
362363
},
363-
bindmarkertap(e) {
364+
onmarkertap(e) {
364365
uni.showModal({
365366
content: JSON.stringify(e)
366367
})
367368
},
368-
bindcontroltap(e) {
369+
oncontroltap(e) {
369370
uni.showModal({
370371
content: JSON.stringify(e)
371372
})
372373
},
373-
bindcallouttap(e) {
374+
oncallouttap(e) {
374375
uni.showModal({
375376
content: JSON.stringify(e)
376377
})
377378
},
378-
bindupdated(e) {
379-
uni.showModal({
380-
content: JSON.stringify(e)
381-
})
379+
onupdated(e) {
380+
console.log(JSON.stringify(e))
382381
},
383-
bindregionchange(e) {
384-
uni.showModal({
385-
content: JSON.stringify(e)
386-
})
382+
onregionchange(e) {
383+
console.log(JSON.stringify(e));
387384
},
388-
bindpoitap(e) {
385+
onpoitap(e) {
389386
uni.showModal({
390387
content: JSON.stringify(e)
391388
})

0 commit comments

Comments
 (0)