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

Function AnimationLayer

libs/mapv/mapv.js:5527–5555  ·  view source on GitHub ↗
(map, dataSet, options)

Source from the content-addressed store, hash-verified

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",

Callers

nothing calls this directly

Calls 9

bindMethod · 0.80
transferToMercatorMethod · 0.80
classCallCheckFunction · 0.70
initMethod · 0.45
onMethod · 0.45
drawMethod · 0.45
getContextMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected