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

Method onAdd

src/mapboxgl/overlay/GraticuleLayer.js:104–120  ·  view source on GitHub ↗
(map)

Source from the content-addressed store, hash-verified

102 }
103
104 onAdd(map) {
105 this.map = map;
106 this.renderer = new GraticuleLayerRenderer(this.map, this.options, {
107 getMapStateByKey: this.getMapStateByKey,
108 getDefaultExtent: this.getDefaultExtent,
109 updateGraticuleLayer: this.updateGraticuleLayer.bind(this),
110 setVisibility: this.setVisibility.bind(this)
111 }, {
112 mapElement: this.map.getCanvas(),
113 targetElement: this.map.getCanvasContainer(),
114 id: this.id
115 });
116 this.addGraticuleLayer();
117 this.resizeEvent = this.renderer._resizeCallback.bind(this.renderer);
118 this.zoomendEvent = this.setVisibility.bind(this);
119 this._bindEvent()
120 }
121
122 onRemove() {
123 this.renderer.onRemove();

Callers

nothing calls this directly

Calls 5

addGraticuleLayerMethod · 0.95
_bindEventMethod · 0.95
bindMethod · 0.80
getCanvasMethod · 0.45
getCanvasContainerMethod · 0.45

Tested by

no test coverage detected