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

Method onAdd

src/maplibregl/overlay/ThreeLayer.js:210–219  ·  view source on GitHub ↗

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

(map)

Source from the content-addressed store, hash-verified

208 * @param {Object} map - 地图对象。
209 */
210 onAdd(map) {
211 var me = this;
212 me._map = map;
213 me.renderer.setMap(map);
214 me.renderer.render();
215 me.on('render', (function () {
216 this.context && this.context.render(this.scene, this.camera);
217 }).bind(me.renderer));
218 return this;
219 }
220
221 /**
222 * @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