目录
- OpenLayers Api Doc
- MapBrowserEvent
- Extends
- 成员 Members
- coordinate{[Coordinate](https://openlayers.org/en/latest/apidoc/module-ol_coordinate.html#~Coordinate)}
- dragging{boolean}
- frameState{[FrameState](https://openlayers.org/en/latest/apidoc/module-ol_Map.html#~FrameState)}
- map{[Map](https://openlayers.org/en/latest/apidoc/module-ol_Map-Map.html)}
- originalEvent{EVENT}
- pixel{[Pixel](https://openlayers.org/en/latest/apidoc/module-ol_pixel.html#~Pixel)}
- target{Object}
- type{string}
- 方法Methods
- 事件Events
- change [inherited](https://openlayers.org/en/latest/apidoc/module-ol_events_Event-BaseEvent.html#event:change)
- click
- dblclick
- error [inherited](https://openlayers.org/en/latest/apidoc/module-ol_events_Event-BaseEvent.html#event:error)
- loadend [inherited](https://openlayers.org/en/latest/apidoc/module-ol_MapEvent-MapEvent.html#event:loadend)
- loadstart [inherited](https://openlayers.org/en/latest/apidoc/module-ol_MapEvent-MapEvent.html#event:loadstart)
- moveend [inherited](https://openlayers.org/en/latest/apidoc/module-ol_MapEvent-MapEvent.html#event:moveend)
- movestart [inherited](https://openlayers.org/en/latest/apidoc/module-ol_MapEvent-MapEvent.html#event:movestart)
- pointerdrag
- pointermove
- postrender [inherited](https://openlayers.org/en/latest/apidoc/module-ol_MapEvent-MapEvent.html#event:postrender)
- singleclick
OpenLayers Api Doc
MapBrowserEvent
Events emitted as map browser events are instances of this type. See Map
for which events trigger a map browser event.
作为地图浏览器事件发出的事件是这种类型的实例。关于哪些事件会触发地图浏览器事件,请参阅地图。
Extends
成员 Members
coordinate{Coordinate}
The coordinate corresponding to the original browser event. This will be in the user projection if one is set. Otherwise it will be in the view projection.
对应于原始浏览器事件的坐标。如果设置了用户投影,这将是一个用户投影。否则,它将是在视图投影中。
dragging{boolean}
Indicates if the map is currently being dragged. Only set for POINTERDRAG
and POINTERMOVE
events. Default is false
.
指示地图是否正在被拖动。只对POINTERDRAG
和POINTERMOVE
事件设置。默认为 “false”。
frameState{FrameState}
The frame state at the time of the event.
事件发生时的框架状态。
map{Map}
The map where the event occurred.
事件发生的地图。
originalEvent{EVENT}
The original browser event.
最初的浏览器事件。
pixel{Pixel}
The map pixel relative to the viewport corresponding to the original event.
相对于视口的地图像素,对应于原始事件。
target{Object}
The event target.
该事件的目标。
type{string}
The event type.
事件的类型。
方法Methods
preventDefault()
Prevents the default browser action. See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.
阻止默认的浏览器动作。见https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault。
stopPropagation()
Prevents further propagation of the current event. See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.
防止当前事件的进一步传播。见https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation。
事件Events
change inherited
Generic change event. Triggered when the revision counter is increased.
通用的改变事件。当修订计数器增加时触发。
click
一个没有拖动的点击。一次双击将发射两个这样的。
A click with no dragging. A double click will fire two of this.
dblclick
真正的双击,没有拖动。
A true double click, with no dragging.
error inherited
通用的错误事件。当一个错误发生时被触发。
Generic error event. Triggered when an error occurs.
loadend inherited
当加载额外的地图数据完成后触发。
Triggered when loading of additional map data has completed.
loadstart inherited
当开始加载额外的地图数据(瓦片、图像、特征)时触发。
Triggered when loading of additional map data (tiles, images, features) starts.
moveend inherited
在地图被移动后触发。
Triggered after the map is moved.
movestart inherited
当地图开始移动时触发。
Triggered when the map starts moving.
pointerdrag
指针被拖动时触发。
Triggered when a pointer is dragged.
pointermove
指针被移动时触发。注意,在触摸设备上,当地图被平移时触发,所以与mousemove不一样。
Triggered when a pointer is moved. Note that on touch devices this is triggered when the map is panned, so is not the same as mousemove.
postrender inherited
在地图帧被渲染后触发。
Triggered after a map frame is rendered.
singleclick
一个真正的单次点击,没有拖动,没有双击。请注意,这个事件被延迟了250毫秒,以确保它不是一个双击。
A true single click with no dragging and no double click. Note that this event is delayed by 250 ms to ensure that it is not a double click.