From 4b3607336b15992bd0e112e277fcf7b21e6fa03a Mon Sep 17 00:00:00 2001 From: Benjamin Clark Date: Tue, 29 Oct 2024 15:46:03 -0400 Subject: [PATCH] Fix the init code to only complete once the manifest is loaded. --- modules/services/OvertureService.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/services/OvertureService.js b/modules/services/OvertureService.js index 88c2fc83f..6ae9ed1a6 100644 --- a/modules/services/OvertureService.js +++ b/modules/services/OvertureService.js @@ -56,11 +56,10 @@ export class OvertureService extends AbstractSystem { const context = this.context; const vtService = context.services.vectortile; - return Promise.resolve(vtService.initAsync()).then( () => { - //other init here after the vector tile service is done initializing - this._loadS3Catalog(); - - }); + return Promise.all([ + vtService.initAsync(), + this._loadS3Catalog() + ]); } @@ -108,7 +107,7 @@ export class OvertureService extends AbstractSystem { } } - + getData(datasetID) { const vtService = this.context.services.vectortile; // 'mapwithai' or 'esri'