Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的地图上有一个可编辑的圆圈,我想看看是否可以让标记始终出现在圆圈的中心。我知道我可以有一个标记并在移动时将其移动到圆的中心。问题是圆圈没有“被拖动时”事件,所以我应该等待拖动停止,然后将标记移动到新的中心。
将圆心绑定到标记的位置
请参阅文档中的此“文章”
概念证明
该示例中的相关更改代码:
var circle = new google.maps.Circle({ strokeWeight: 2, draggable: true });