bruce-models 4.2.3 → 4.2.4
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/bruce-models.es5.js +28 -11
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +28 -11
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/common/bounds.js +28 -10
- package/dist/lib/common/bounds.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -4600,22 +4600,39 @@
|
|
|
4600
4600
|
minLongitude: null
|
|
4601
4601
|
};
|
|
4602
4602
|
const points = [];
|
|
4603
|
-
|
|
4604
|
-
|
|
4603
|
+
const location = exports.Entity.GetValue({
|
|
4604
|
+
entity: entity,
|
|
4605
|
+
path: ["location"]
|
|
4606
|
+
});
|
|
4607
|
+
if (location) {
|
|
4608
|
+
points.push(location);
|
|
4605
4609
|
}
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4610
|
+
const geometry = exports.Entity.GetValue({
|
|
4611
|
+
entity: entity,
|
|
4612
|
+
path: ["geometry"]
|
|
4613
|
+
});
|
|
4614
|
+
const processGeometry = (geometry, depth = 0) => {
|
|
4615
|
+
if (!geometry || depth > 5) {
|
|
4616
|
+
return;
|
|
4617
|
+
}
|
|
4618
|
+
if (geometry.Point) {
|
|
4619
|
+
points.push(...exports.Geometry.ParsePoints(geometry.Point));
|
|
4609
4620
|
}
|
|
4610
|
-
if (
|
|
4611
|
-
points.push(...exports.Geometry.ParsePoints(
|
|
4621
|
+
if (geometry.LineString) {
|
|
4622
|
+
points.push(...exports.Geometry.ParsePoints(geometry.LineString));
|
|
4612
4623
|
}
|
|
4613
|
-
if (
|
|
4614
|
-
for (const ring of
|
|
4624
|
+
if (geometry.Polygon) {
|
|
4625
|
+
for (const ring of geometry.Polygon) {
|
|
4615
4626
|
points.push(...exports.Geometry.ParsePoints(ring.LinearRing));
|
|
4616
4627
|
}
|
|
4617
4628
|
}
|
|
4618
|
-
|
|
4629
|
+
if (geometry.MultiGeometry) {
|
|
4630
|
+
for (const multiGeometry of geometry.MultiGeometry) {
|
|
4631
|
+
processGeometry(multiGeometry, depth + 1);
|
|
4632
|
+
}
|
|
4633
|
+
}
|
|
4634
|
+
};
|
|
4635
|
+
processGeometry(geometry);
|
|
4619
4636
|
for (const point of points) {
|
|
4620
4637
|
if (bounds.maxLatitude == null || point.latitude > bounds.maxLatitude) {
|
|
4621
4638
|
bounds.maxLatitude = point.latitude;
|
|
@@ -12959,7 +12976,7 @@
|
|
|
12959
12976
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
12960
12977
|
|
|
12961
12978
|
// This is updated with the package.json version on build.
|
|
12962
|
-
const VERSION = "4.2.
|
|
12979
|
+
const VERSION = "4.2.4";
|
|
12963
12980
|
|
|
12964
12981
|
exports.VERSION = VERSION;
|
|
12965
12982
|
exports.AbstractApi = AbstractApi;
|