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

Method onAdd

src/maplibregl/overlay/GraphicLayer.js:60–65  ·  view source on GitHub ↗

* @function GraphicLayer.prototype.onAdd * @description 添加该图层。 * @param {maplibregl.Map} map - MapLibreGL Map 对象。

(map)

Source from the content-addressed store, hash-verified

58 * @param {maplibregl.Map} map - MapLibreGL Map 对象。
59 */
60 onAdd(map) {
61 this.map = map;
62 this.renderer = new GraphicLayerRenderer(this.id, this.options, {
63 getMapState: this.getMapState.bind(this)
64 }, { targetElement: this.map.getCanvasContainer(), mapElement: this.map.getCanvas() });
65 }
66 /**
67 * @function GraphicLayer.prototype.render
68 * @description 添加该图层。

Callers 1

addToMethod · 0.95

Calls 3

bindMethod · 0.80
getCanvasContainerMethod · 0.45
getCanvasMethod · 0.45

Tested by

no test coverage detected