(map, dataSet, options)
| 5829 | inherits(Layer, _BaseLayer); |
| 5830 | |
| 5831 | function Layer(map, dataSet, options) { |
| 5832 | classCallCheck(this, Layer); |
| 5833 | |
| 5834 | var _this = possibleConstructorReturn(this, (Layer.__proto__ || Object.getPrototypeOf(Layer)).call(this, map, dataSet, options)); |
| 5835 | |
| 5836 | var self = _this; |
| 5837 | options = options || {}; |
| 5838 | |
| 5839 | _this.clickEvent = _this.clickEvent.bind(_this); |
| 5840 | _this.mousemoveEvent = _this.mousemoveEvent.bind(_this); |
| 5841 | _this.tapEvent = _this.tapEvent.bind(_this); |
| 5842 | |
| 5843 | self.init(options); |
| 5844 | self.argCheck(options); |
| 5845 | self.transferToMercator(); |
| 5846 | |
| 5847 | var canvasLayer = _this.canvasLayer = new CanvasLayer({ |
| 5848 | map: map, |
| 5849 | context: _this.context, |
| 5850 | updateImmediate: options.updateImmediate, |
| 5851 | paneName: options.paneName, |
| 5852 | mixBlendMode: options.mixBlendMode, |
| 5853 | enableMassClear: options.enableMassClear, |
| 5854 | zIndex: options.zIndex, |
| 5855 | update: function update() { |
| 5856 | self._canvasUpdate(); |
| 5857 | } |
| 5858 | }); |
| 5859 | |
| 5860 | dataSet.on('change', function () { |
| 5861 | self.transferToMercator(); |
| 5862 | // 数据更新后重新生成聚合数据 |
| 5863 | if (options.draw === 'cluster') { |
| 5864 | self.refreshCluster(); |
| 5865 | } |
| 5866 | canvasLayer.draw(); |
| 5867 | }); |
| 5868 | return _this; |
| 5869 | } |
| 5870 | |
| 5871 | createClass(Layer, [{ |
| 5872 | key: 'clickEvent', |
nothing calls this directly
no test coverage detected