(map, dataSet, options)
| 5525 | inherits(AnimationLayer, _BaseLayer); |
| 5526 | |
| 5527 | function AnimationLayer(map, dataSet, options) { |
| 5528 | classCallCheck(this, AnimationLayer); |
| 5529 | |
| 5530 | var _this = possibleConstructorReturn(this, (AnimationLayer.__proto__ || Object.getPrototypeOf(AnimationLayer)).call(this, map, dataSet, options)); |
| 5531 | |
| 5532 | _this.map = map; |
| 5533 | _this.options = options || {}; |
| 5534 | _this.dataSet = dataSet; |
| 5535 | |
| 5536 | var canvasLayer = new CanvasLayer({ |
| 5537 | map: map, |
| 5538 | zIndex: _this.options.zIndex, |
| 5539 | update: _this._canvasUpdate.bind(_this) |
| 5540 | }); |
| 5541 | |
| 5542 | _this.init(_this.options); |
| 5543 | |
| 5544 | _this.canvasLayer = canvasLayer; |
| 5545 | _this.transferToMercator(); |
| 5546 | var self = _this; |
| 5547 | dataSet.on('change', function () { |
| 5548 | self.transferToMercator(); |
| 5549 | canvasLayer.draw(); |
| 5550 | }); |
| 5551 | _this.ctx = canvasLayer.canvas.getContext('2d'); |
| 5552 | |
| 5553 | _this.start(); |
| 5554 | return _this; |
| 5555 | } |
| 5556 | |
| 5557 | createClass(AnimationLayer, [{ |
| 5558 | key: "draw", |
nothing calls this directly
no test coverage detected