MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / onAdd

Method onAdd

src/mapboxgl/overlay/ThreeLayer.js:72–81  ·  view source on GitHub ↗

* @function ThreeLayer.prototype.onAdd * @description 添加图层到地图。 * @param {Object} map - 地图对象。

(map)

Source from the content-addressed store, hash-verified

70 * @param {Object} map - 地图对象。
71 */
72 onAdd(map) {
73 var me = this;
74 me._map = map;
75 me.renderer.setMap(map);
76 me.renderer.render();
77 me.on('render', (function () {
78 this.context && this.context.render(this.scene, this.camera);
79 }).bind(me.renderer));
80 return this;
81 }
82
83 /**
84 * @function ThreeLayer.prototype.addTo

Callers

nothing calls this directly

Calls 4

bindMethod · 0.80
renderMethod · 0.65
setMapMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected