[英]OpenLayers: value of Event parameter in OpenLayers.Event.triggerEvent
我正在查看有关OpenLayers中触发事件的文档 。 它列出了具有type:String
参数和evt:Event
参数的triggerEvent
。 我了解type
参数是什么,但是Event
对象是什么对象? 我找不到明确的例子。
如果相关的话,我正在研究Google Maps v3和OpenLayers之间的接口,并且试图提出一种方法,以便可以使用相同的API接口来调用:
google.maps.event.trigger(instance:Object, eventName:String, var_args:*)
openLayersObj.events.triggerEvent(type:String, evt:Event)
Doc是错误的。 应该是Event || object
Event || object
。 将作为args的对象传递给侦听器回调。
查看源代码: https : //github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Events.js#L820使用示例: https : //github.com/openlayers/openlayers/blob/master/ LIB /的OpenLayers / Map.js#L1042
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.