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

Method constructor

src/openlayers/overlay/mapv/MapvLayer.js:38–71  ·  view source on GitHub ↗
(map, dataSet, options, mapWidth, mapHeight, source)

Source from the content-addressed store, hash-verified

36export class MapvLayer extends BaiduMapLayer {
37
38 constructor(map, dataSet, options, mapWidth, mapHeight, source) {
39 super(map, dataSet, options);
40 this.dataSet = dataSet;
41 this.mapWidth = mapWidth;
42 this.mapHeight = mapHeight;
43 var self = this;
44 options = options || {};
45 this.source = source;
46 self.animator = null;
47 self.map = map;
48 self.init(options);
49 self.argCheck(options);
50 this.canvasLayer = new MapvCanvasLayer({
51 map: map,
52 context: this.context,
53 paneName: options.paneName,
54 mixBlendMode: options.mixBlendMode,
55 enableMassClear: options.enableMassClear,
56 zIndex: options.zIndex,
57 width: mapWidth,
58 height: mapHeight,
59 update: function update() {
60 self._canvasUpdate();
61 }
62 });
63 this.clickEvent = this.clickEvent.bind(this);
64 this.mousemoveEvent = this.mousemoveEvent.bind(this);
65 map.on('movestart', this.moveStartEvent.bind(this));
66 map.on('moveend', this.moveEndEvent.bind(this));
67 map.getView().on('change:center', this.zoomEvent.bind(this));
68 map.getView().on('change:size', this.sizeEvent.bind(this));
69 map.on('pointerdrag', this.dragEvent.bind(this));
70 this.bindEvent();
71 }
72
73 /**
74 * @function MapvLayer.prototype.init

Callers

nothing calls this directly

Calls 7

bindEventMethod · 0.95
argCheckMethod · 0.80
bindMethod · 0.80
getViewMethod · 0.80
initMethod · 0.45
_canvasUpdateMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected