在項(xiàng)目中給高德地圖的點(diǎn)標(biāo)記添加點(diǎn)擊事件時(shí)報(bào)錯(cuò),詳情看下方代碼:1.創(chuàng)建點(diǎn)標(biāo)記new AMap.Marker({icon: icon,//24px*26pxposition: vue.customer[i].position,title: vue.customer[i].name,zIndex: 200,clickable: true,map: map});2.給點(diǎn)標(biāo)記添加點(diǎn)擊事件var clickHandle = AMap.event.addListener(marker, 'click', function() {console.log("1111")});3.點(diǎn)擊后報(bào)錯(cuò)marker is not defined
調(diào)用高德地圖js的api,給點(diǎn)標(biāo)記添加click事件
湖上湖
2018-08-05 13:35:24