Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (cache && cacheUpdateSuccess) {
this.addOverPassCacheLayer(rootLayer, layerModel, hiddenLayer);
}
const overPassRequest = OverPassHelper.buildRequestForTheme(
layerModel.get('overpassRequest') || ''
);
const loadedBounds = [];
if (cache && cacheBounds) {
loadedBounds.push(cacheBounds);
}
const overPassLayer = new OverPassLayer({
loadedBounds,
debug: this._config.debug,
endPoint: this._config.overPassEndPoint,
minZoom: layerModel.get('minZoom'),
timeout: this._config.overPassTimeout,
retryOnTimeout: true,
query: overPassRequest,
beforeRequest: () => {
this.showLayerLoadingProgress(layerModel);
},
afterRequest: () => {
this.hideLayerLoadingProgress(layerModel);
},
onSuccess: receivedData => {
const data = { ...receivedData };
const objects = {};