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

Method onAdd

src/mapboxgl/overlay/GraphicLayer.js:61–66  ·  view source on GitHub ↗

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

(map)

Source from the content-addressed store, hash-verified

59 * @returns {GraphicLayer}
60 */
61 onAdd(map) {
62 this.map = map;
63 this.renderer = new GraphicLayerRenderer(this.id, this.options, {
64 getMapState: this.getMapState.bind(this)
65 }, { targetElement: this.map.getCanvasContainer(), mapElement: this.map.getCanvas() });
66 }
67
68 /**
69 * @function GraphicLayer.prototype.onRemove

Callers 1

addToMethod · 0.95

Calls 3

bindMethod · 0.80
getCanvasContainerMethod · 0.45
getCanvasMethod · 0.45

Tested by

no test coverage detected