且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

更改传单中标记的大小

更新时间:2023-11-22 09:34:22

您可以从标记本身获取旧图标,更改图标的大小,然后使用更改后的图标调用setIcon:

You can get the old icon from the marker itself, change the size of the icon and then call setIcon with the changed icon:

var icon = centerMarker.options.icon;
icon.options.iconSize = [newwidth, newheight];
centerMarker.setIcon(icon);