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

Method _updateFeatures

src/mapboxgl/overlay/FGBLayer.js:181–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

179 }
180
181 async _updateFeatures() {
182 const bounds = this.map.getBounds().toArray();
183 const extentToLoad = [bounds[0][0], bounds[0][1], bounds[1][0], bounds[1][1]];
184 const alreadyLoaded = this.renderer._forEachInExtent(extentToLoad, (object) => {
185 return this.renderer._containsExtent(object.extent, extentToLoad);
186 });
187 if (!alreadyLoaded) {
188 let iter = await this.renderer._loadData(extentToLoad);
189 const features = await this.renderer.iterateFeatures(iter);
190 this.map.getSource(this._sourceId).setData(features);
191 }
192 }
193}

Callers

nothing calls this directly

Calls 8

_forEachInExtentMethod · 0.80
_containsExtentMethod · 0.80
_loadDataMethod · 0.80
iterateFeaturesMethod · 0.80
toArrayMethod · 0.45
getBoundsMethod · 0.45
setDataMethod · 0.45
getSourceMethod · 0.45

Tested by

no test coverage detected