MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / bindEvent

Method bindEvent

src/openlayers/overlay/mapv/MapvLayer.js:162–177  ·  view source on GitHub ↗

* @function MapvLayer.prototype.bindEvent * @description 绑定事件。

()

Source from the content-addressed store, hash-verified

160 * @description 绑定事件。
161 */
162 bindEvent() {
163 var me = this;
164 var map = me.map;
165 if (me.options.methods) {
166 if (me.options.methods.click) {
167 map.on('click', me.clickEvent);
168 }
169 if (me.options.methods.mousemove) {
170 me.pointerInteraction = new PointerInteraction();
171 me.pointerInteraction.handleMoveEvent_ = function (event) {
172 me.mousemoveEvent(event);
173 };
174 map.addInteraction(me.pointerInteraction);
175 }
176 }
177 }
178
179 /**
180 * @function MapvLayer.prototype.unbindEvent

Callers 1

constructorMethod · 0.95

Calls 2

onMethod · 0.45
mousemoveEventMethod · 0.45

Tested by

no test coverage detected