* @function MapvLayer.prototype.bindEvent * @description 绑定事件。
()
| 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 |
no test coverage detected