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

Function MapVLayer

libs/mapv/mapv.js:8828–8845  ·  view source on GitHub ↗

*Creates an instance of MapVLayer. * @param {*} viewer * @param {*} dataset * @param {*} options * @param {*} container default viewer.container * @memberof MapVLayer

(viewer, dataset, options, container)

Source from the content-addressed store, hash-verified

8826 * @memberof MapVLayer
8827 */
8828 function MapVLayer(viewer, dataset, options, container) {
8829 classCallCheck(this, MapVLayer);
8830
8831 this.map = viewer, this.scene = viewer.scene, this.mapvBaseLayer = new MapVRenderer$1(viewer, dataset, options, this), this.mapVOptions = options, this.initDevicePixelRatio(), this.canvas = this._createCanvas(), this.render = this.render.bind(this);
8832 if (container) {
8833 this.container = container;
8834 } else {
8835 var inner = viewer.container.querySelector('.cesium-viewer-cesiumWidgetContainer');
8836 this.container = inner ? inner : viewer.container;
8837 }
8838 this.addInnerContainer();
8839
8840 // void 0 != container ? (this.container = container,
8841 // container.appendChild(this.canvas)) : (this.container = viewer.container,
8842 // this.addInnerContainer()),
8843 this.bindEvent();
8844 this._reset();
8845 }
8846
8847 createClass(MapVLayer, [{
8848 key: 'initDevicePixelRatio',

Callers

nothing calls this directly

Calls 5

bindMethod · 0.80
_resetMethod · 0.80
classCallCheckFunction · 0.70
_createCanvasMethod · 0.45
bindEventMethod · 0.45

Tested by

no test coverage detected