@dra2020/baseclient 1.0.6 → 1.0.7

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.
@@ -1375,10 +1375,9 @@ class GeoMultiCollection {
1375
1375
  let n = this.nEntries;
1376
1376
  if (n == 1)
1377
1377
  this.all.col = this._col(this.nthEntry(0));
1378
- else {
1379
- this.all.col = { type: 'FeatureCollection', features: [] };
1380
- this.forEach(f => { this.all.col.features.push(f); });
1381
- }
1378
+ else
1379
+ // Going from map to collection guarantees that any duplicates are removed
1380
+ this.all.col = geoMapToCollection(this.allMap());
1382
1381
  }
1383
1382
  return this.all.col;
1384
1383
  }
@@ -1390,8 +1389,11 @@ class GeoMultiCollection {
1390
1389
  let n = this.nEntries;
1391
1390
  if (n == 1)
1392
1391
  this.all.map = this._map(this.nthEntry(0));
1393
- else
1394
- this.all.map = geoCollectionToMap(this.allCol());
1392
+ else {
1393
+ let map = {};
1394
+ this.all.map = map;
1395
+ this.forEach(f => { map[String(f.properties.id)] = f; });
1396
+ }
1395
1397
  }
1396
1398
  return this.all.map;
1397
1399
  }