@provoly/dashboard 1.4.29 → 1.4.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12599,11 +12599,11 @@ class DashboardEffects {
12599
12599
  });
12600
12600
  })));
12601
12601
  this.getWfsFeaturesForPointStack = createEffect(() => this.actions$.pipe(ofType(DashboardActions.getWfsFeaturesForPointStackTooltips), mergeMap((action) => combineLatest([of(action), this.wmsService.getWmsFeatures(action.url)])), mergeMap(([action, wmsJson]) => {
12602
- // check if data is actually a stack of points
12603
- if (wmsJson.features[0] &&
12604
- wmsJson.features[0].properties.count &&
12605
- wmsJson.features[0].properties.countunique &&
12606
- wmsJson.features[0].properties.count > 1) {
12602
+ // check if data is at least a stack of points
12603
+ const isStack = wmsJson.features
12604
+ .map((feature) => !!feature && !!feature.properties.count && feature.properties.countunique && feature.properties.count > 1)
12605
+ .reduce((p, c) => p || c, false);
12606
+ if (isStack) {
12607
12607
  let envBBOXCoords = [...wmsJson.features[0].properties.envBBOX.matchAll(/\d+.\d+/g)].map((m) => parseFloat(m[0]));
12608
12608
  return this.wmsService
12609
12609
  .getWfsFeatures(action.url, envBBOXCoords, action.geomPropName ?? wmsJson.features[0]['geometry_name'])