bruce-models 4.6.8 → 4.6.9
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 +15 -3
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +15 -3
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/common/geometry.js +14 -2
- package/dist/lib/common/geometry.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/common/geometry.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -4528,7 +4528,7 @@ var Geometry;
|
|
|
4528
4528
|
* @returns returns GeoJSON or null if conversion failed or resulted in an empty object.
|
|
4529
4529
|
*/
|
|
4530
4530
|
function ToGeoJsonFeature(params) {
|
|
4531
|
-
const { geometry, properties, altitude } = params;
|
|
4531
|
+
const { geometry, properties, altitude, noAltitude } = params;
|
|
4532
4532
|
// Primary collection of geometries.
|
|
4533
4533
|
// We will return a single feature that contains many geometries.
|
|
4534
4534
|
// That way we can attach properties to the top-level.
|
|
@@ -4583,6 +4583,9 @@ var Geometry;
|
|
|
4583
4583
|
const points = ParsePoints(polygon.LinearRing);
|
|
4584
4584
|
return removeConsecutiveDuplicates(points.map(coord => {
|
|
4585
4585
|
const { longitude: lon, latitude: lat, altitude: alt } = coord;
|
|
4586
|
+
if (noAltitude) {
|
|
4587
|
+
return [lon, lat];
|
|
4588
|
+
}
|
|
4586
4589
|
return (altitude != null ? [lon, lat, altitude] : [lon, lat, alt !== undefined ? alt : 0]);
|
|
4587
4590
|
}));
|
|
4588
4591
|
}));
|
|
@@ -4597,6 +4600,9 @@ var Geometry;
|
|
|
4597
4600
|
const points = ParsePoints(geometry.LineString);
|
|
4598
4601
|
const coordinates = removeConsecutiveDuplicates(points.map(coord => {
|
|
4599
4602
|
const { longitude: lon, latitude: lat, altitude: alt } = coord;
|
|
4603
|
+
if (noAltitude) {
|
|
4604
|
+
return [lon, lat];
|
|
4605
|
+
}
|
|
4600
4606
|
return (altitude != null ? [lon, lat, altitude] : [lon, lat, alt !== undefined ? alt : 0]);
|
|
4601
4607
|
}));
|
|
4602
4608
|
if (coordinates.length >= 2) {
|
|
@@ -4610,7 +4616,13 @@ var Geometry;
|
|
|
4610
4616
|
const points = ParsePoints(geometry.Point);
|
|
4611
4617
|
if (points.length) {
|
|
4612
4618
|
const { longitude: lon, latitude: lat, altitude: alt } = points[0];
|
|
4613
|
-
|
|
4619
|
+
let coordinates;
|
|
4620
|
+
if (noAltitude) {
|
|
4621
|
+
coordinates = [lon, lat];
|
|
4622
|
+
}
|
|
4623
|
+
else {
|
|
4624
|
+
coordinates = altitude != null ? [lon, lat, altitude] : [lon, lat, alt !== undefined ? alt : 0];
|
|
4625
|
+
}
|
|
4614
4626
|
jGeometry = {
|
|
4615
4627
|
coordinates: coordinates,
|
|
4616
4628
|
type: GeoJson.EType.Point
|
|
@@ -14025,7 +14037,7 @@ var DataSource;
|
|
|
14025
14037
|
})(DataSource || (DataSource = {}));
|
|
14026
14038
|
|
|
14027
14039
|
// This is updated with the package.json version on build.
|
|
14028
|
-
const VERSION = "4.6.
|
|
14040
|
+
const VERSION = "4.6.9";
|
|
14029
14041
|
|
|
14030
14042
|
export { VERSION, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, GeoJson, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityTypeVisualSettings, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, AccountLimits, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
14031
14043
|
//# sourceMappingURL=bruce-models.es5.js.map
|