google.maps.Map 的事件

本文详细介绍了 Google Maps JavaScript API V3 中的各种地图事件及其参数,包括地图边界变化、中心点变化、点击和双击等事件,帮助开发者更好地理解和使用这些事件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Google Maps JavaScript API V3 Reference
https://developers.google.com/maps/documentation/javascript/reference#release-version




google.maps.Map class

Events
bounds_changed
Arguments:   None
This event is fired when the viewport bounds have changed.
center_changed
Arguments:   None
This event is fired when the map center property changes.
click
Arguments:   MouseEvent
This event is fired when the user clicks on the map (but not when they click on a marker or infowindow).
dblclick
Arguments:   MouseEvent
This event is fired when the user double-clicks on the map. Note that the click event will also fire, right before this one.
drag
Arguments:   None
This event is repeatedly fired while the user drags the map.
dragend
Arguments:   None
This event is fired when the user stops dragging the map.
dragstart
Arguments:   None
This event is fired when the user starts dragging the map.
heading_changed
Arguments:   None
This event is fired when the map heading property changes.
idle
Arguments:   None
This event is fired when the map becomes idle after panning or zooming.
maptypeid_changed
Arguments:   None
This event is fired when the mapTypeId property changes.
mousemove
Arguments:   MouseEvent
This event is fired whenever the user's mouse moves over the map container.
mouseout
Arguments:   MouseEvent
This event is fired when the user's mouse exits the map container.
mouseover
Arguments:   MouseEvent
This event is fired when the user's mouse enters the map container.
projection_changed
Arguments:   None
This event is fired when the projection has changed.
resize
Arguments:   None
Developers should trigger this event on the map when the div changes size: google.maps.event.trigger(map, 'resize') .
rightclick
Arguments:   MouseEvent
This event is fired when the DOM contextmenu event is fired on the map container.
tilesloaded
Arguments:   None
This event is fired when the visible tiles have finished loading.
tilt_changed
Arguments:   None
This event is fired when the map tilt property changes.
zoom_changed
Arguments:   None
This event is fired when the map zoom property changes.





Google Maps JavaScript API V3 Reference
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值