var content
=
'<div style="margin:0;line-height:20px;padding:2px;">' +
'地址:港澳工业开发区' +
'</div>'
var searchInfoWindow
= null
searchInfoWindow
= new BMapLib.SearchInfoWindow(map
, content
, {
title
: '港澳工业开发区',
width
: 290,
height
: 30,
panel
: 'panel',
enableAutoPan
: true,
searchTypes
: [
BMAPLIB_TAB_SEARCH,
BMAPLIB_TAB_TO_HERE,
BMAPLIB_TAB_FROM_HERE,
],
})
marker
.enableDragging()
searchInfoWindow
.open(marker
)
marker
.addEventListener('click', function (e
) {
searchInfoWindow
.open(marker
)
})
map
.addOverlay(marker
)
转载请注明原文地址: https://lol.8miu.com/read-4485.html