bruce-cesium 1.5.8 → 1.5.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-cesium.es5.js +16 -13
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +15 -12
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine.js +15 -12
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Carto, Geometry, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, DelayQueue, Entity as Entity$1, BatchedDataGetter, EntityRelationType, Tileset, EntityCoords, EntityFilterGetter, EntitySource, MenuItem, EntityRelation, ProjectView, ProjectViewBookmark, ProjectViewTile, ProjectViewLegacyTile, ProgramKey, Camera } from 'bruce-models';
|
|
2
|
-
import {
|
|
2
|
+
import { Color, HeightReference, Cartographic, Cartesian3, EllipsoidTerrainProvider, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Math as Math$1, Transforms, ColorBlendMode, Cartesian2, Primitive, Cesium3DTileFeature, SceneMode, Cesium3DTileColorBlendMode, HeadingPitchRange, createOsmBuildings, Cesium3DTileStyle, Rectangle, OrthographicFrustum, JulianDate, KmlDataSource, CallbackProperty, createWorldTerrain, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, Cesium3DTileset, Matrix4, IonResource, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, ColorMaterialProperty, Matrix3, EasingFunction, GeometryInstance } from 'cesium';
|
|
3
3
|
|
|
4
4
|
var TIME_LAG = 300;
|
|
5
5
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -1724,21 +1724,24 @@ var EntityRenderEngine;
|
|
|
1724
1724
|
flattenPoints = true;
|
|
1725
1725
|
}
|
|
1726
1726
|
var posses = points.map(function (x) { return Cartesian3.fromDegrees(EnsureNumber(x.longitude), EnsureNumber(x.latitude), EnsureNumber(flattenPoints ? 0 : x.altitude)); });
|
|
1727
|
-
//
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
totalDistance += Cartesian3.distance(pos1, pos2);
|
|
1736
|
-
}
|
|
1727
|
+
// 5 points should be enough to tell most bad data.
|
|
1728
|
+
var CHECK_POINTS = 5;
|
|
1729
|
+
var MIN_LEN = 0.001;
|
|
1730
|
+
var MAX_LEN = 4500000;
|
|
1731
|
+
var totalLength = 0;
|
|
1732
|
+
for (var i = 0; i < posses.length; i++) {
|
|
1733
|
+
if (i > CHECK_POINTS) {
|
|
1734
|
+
break;
|
|
1737
1735
|
}
|
|
1738
|
-
|
|
1739
|
-
|
|
1736
|
+
var pos1 = posses[i];
|
|
1737
|
+
var pos2 = posses[i + 1];
|
|
1738
|
+
if (pos1 && pos2) {
|
|
1739
|
+
totalLength += Cartesian3.distance(pos1, pos2);
|
|
1740
1740
|
}
|
|
1741
1741
|
}
|
|
1742
|
+
if (totalLength < MIN_LEN || totalLength > MAX_LEN) {
|
|
1743
|
+
return null;
|
|
1744
|
+
}
|
|
1742
1745
|
var bColor = style.lineColor ? Calculator.GetColor(style.lineColor, entity, params.tags) : null;
|
|
1743
1746
|
var cColor = bColor ? colorToCColor(bColor) : Color.RED;
|
|
1744
1747
|
var width = style.lineWidth ? Calculator.GetNumber(style.lineWidth, entity, params.tags) : null;
|