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

Method removeLayer

src/mapboxgl/mapping/VideoMap.js:174–183  ·  view source on GitHub ↗

* @function VideoMap.prototype.removeLayer * @description 移除图层。 * @param {string} id - 图层 id。

(id)

Source from the content-addressed store, hash-verified

172 * @param {string} id - 图层 id。
173 */
174 removeLayer(id) {
175 if (!this._mapExisted()) {
176 return;
177 }
178 if (this.layerCache[id]) {
179 this.layerCache[id].remove();
180 this.layerCache[id] = null;
181 delete this.layerCache[id];
182 }
183 }
184
185 /**
186 * @function VideoMap.prototype.removeSource

Callers 2

removeMethod · 0.45
removeMethod · 0.45

Calls 2

_mapExistedMethod · 0.95
removeMethod · 0.45

Tested by

no test coverage detected