@dra2020/baseclient 1.0.106 → 1.0.109
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.
- package/dist/baseclient.js +14 -3
- package/dist/baseclient.js.map +1 -1
- package/dist/poly/topo.d.ts +5 -0
- package/lib/geo/geo.ts +8 -1
- package/lib/poly/topo.ts +8 -0
- package/package.json +2 -2
package/dist/baseclient.js
CHANGED
|
@@ -2730,8 +2730,13 @@ class GeoMultiCollection {
|
|
|
2730
2730
|
this.all.col = this.all.col || e.col;
|
|
2731
2731
|
this.all.map = this.all.map || e.map;
|
|
2732
2732
|
}
|
|
2733
|
-
else
|
|
2734
|
-
|
|
2733
|
+
else {
|
|
2734
|
+
// Old-style, goes through map (to filter hidden) and then collection
|
|
2735
|
+
// this.all.topo = geoCollectionToTopoNonNull(this.allCol());
|
|
2736
|
+
// New style, use splice on packed topologies
|
|
2737
|
+
let topoarray = Object.values(this.entries).map((e) => { return { topology: this._topo(e), filterout: this.hidden }; });
|
|
2738
|
+
this.all.topo = Poly.topoSplice(topoarray);
|
|
2739
|
+
}
|
|
2735
2740
|
}
|
|
2736
2741
|
return this.all.topo;
|
|
2737
2742
|
}
|
|
@@ -9794,7 +9799,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
9794
9799
|
return result;
|
|
9795
9800
|
};
|
|
9796
9801
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9797
|
-
exports.topoUnpack = exports.topoPack = exports.topoPacked = exports.FsmTopoUnion = exports.topoMergeFeatures = exports.topoMerge = exports.topoSimplifyCollection = exports.topoToCollection = exports.topoToFeature = exports.topoContiguity = exports.topoFromCollection = void 0;
|
|
9802
|
+
exports.topoUnpack = exports.topoPack = exports.topoPacked = exports.FsmTopoUnion = exports.topoMergeFeatures = exports.topoMerge = exports.topoSimplifyCollection = exports.topoToCollection = exports.topoSplice = exports.topoToFeature = exports.topoContiguity = exports.topoFromCollection = void 0;
|
|
9798
9803
|
// Forked version that supports packing
|
|
9799
9804
|
const TopoClient = __importStar(__webpack_require__(/*! @dra2020/topojson-client */ "@dra2020/topojson-client"));
|
|
9800
9805
|
// Forked version that fixes self-looping hole problem
|
|
@@ -9880,6 +9885,12 @@ function topoToFeature(topo, geoid) {
|
|
|
9880
9885
|
return correctGeometry(TopoClient.feature(topo, topo.objects[geoid]));
|
|
9881
9886
|
}
|
|
9882
9887
|
exports.topoToFeature = topoToFeature;
|
|
9888
|
+
function topoSplice(topoarray) {
|
|
9889
|
+
if (topoarray)
|
|
9890
|
+
topoarray.forEach(e => topoPack(e.topology));
|
|
9891
|
+
return TopoClient.splice(topoarray);
|
|
9892
|
+
}
|
|
9893
|
+
exports.topoSplice = topoSplice;
|
|
9883
9894
|
function topoToCollection(topo) {
|
|
9884
9895
|
let col = { type: 'FeatureCollection', features: [] };
|
|
9885
9896
|
if (topo)
|