@openglobus/og 0.18.0 → 0.18.2
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/README.md +8 -8
- package/lib/@openglobus/og.esm.js +2 -0
- package/lib/@openglobus/og.esm.js.map +1 -0
- package/lib/@openglobus/og.umd.js +2 -0
- package/lib/@openglobus/og.umd.js.map +1 -0
- package/lib/js/Clock.d.ts +106 -0
- package/{src/Clock.ts → lib/js/Clock.js} +31 -126
- package/lib/js/Deferred.d.ts +6 -0
- package/lib/js/Deferred.js +13 -0
- package/lib/js/Events.d.ts +90 -0
- package/{src/Events.ts → lib/js/Events.js} +29 -84
- package/lib/js/Extent.d.ts +145 -0
- package/{src/Extent.ts → lib/js/Extent.js} +74 -120
- package/lib/js/Globe.d.ts +132 -0
- package/{src/Globe.ts → lib/js/Globe.js} +61 -159
- package/lib/js/ImageCanvas.d.ts +128 -0
- package/{src/ImageCanvas.ts → lib/js/ImageCanvas.js} +24 -65
- package/lib/js/Lock.d.ts +15 -0
- package/{src/Lock.ts → lib/js/Lock.js} +7 -21
- package/lib/js/LonLat.d.ts +128 -0
- package/{src/LonLat.ts → lib/js/LonLat.js} +44 -75
- package/lib/js/Object3d.d.ts +49 -0
- package/{src/Object3d.ts → lib/js/Object3d.js} +64 -184
- package/lib/js/Popup.d.ts +46 -0
- package/{src/Popup.ts → lib/js/Popup.js} +42 -110
- package/lib/js/QueueArray.d.ts +16 -0
- package/{src/QueueArray.ts → lib/js/QueueArray.js} +12 -25
- package/lib/js/Rectangle.d.ts +76 -0
- package/{src/Rectangle.ts → lib/js/Rectangle.js} +12 -50
- package/lib/js/Stack.d.ts +20 -0
- package/{src/Stack.ts → lib/js/Stack.js} +13 -29
- package/lib/js/astro/astro.d.ts +39 -0
- package/{src/astro/astro.ts → lib/js/astro/astro.js} +2 -8
- package/lib/js/astro/earth.d.ts +8 -0
- package/{src/astro/earth.ts → lib/js/astro/earth.js} +3 -39
- package/lib/js/astro/jd.d.ts +234 -0
- package/{src/astro/jd.ts → lib/js/astro/jd.js} +55 -134
- package/lib/js/astro/orbit.d.ts +5 -0
- package/{src/astro/orbit.ts → lib/js/astro/orbit.js} +26 -39
- package/lib/js/astro/rotation.d.ts +2 -0
- package/{src/astro/rotation.ts → lib/js/astro/rotation.js} +2 -11
- package/lib/js/bv/Box.d.ts +32 -0
- package/{src/bv/Box.ts → lib/js/bv/Box.js} +7 -35
- package/lib/js/bv/Sphere.d.ts +37 -0
- package/{src/bv/Sphere.ts → lib/js/bv/Sphere.js} +6 -34
- package/{src/bv/index.ts → lib/js/bv/index.d.ts} +0 -1
- package/lib/js/bv/index.js +3 -0
- package/lib/js/camera/Camera.d.ts +314 -0
- package/{src/camera/Camera.ts → lib/js/camera/Camera.js} +77 -326
- package/lib/js/camera/Frustum.d.ts +139 -0
- package/{src/camera/Frustum.ts → lib/js/camera/Frustum.js} +66 -185
- package/lib/js/camera/PlanetCamera.d.ts +234 -0
- package/{src/camera/PlanetCamera.ts → lib/js/camera/PlanetCamera.js} +65 -338
- package/{src/camera/index.ts → lib/js/camera/index.d.ts} +0 -1
- package/lib/js/camera/index.js +3 -0
- package/lib/js/cons.d.ts +40 -0
- package/{src/cons.ts → lib/js/cons.js} +10 -22
- package/lib/js/control/Atmosphere.d.ts +16 -0
- package/{src/control/Atmosphere.ts → lib/js/control/Atmosphere.js} +33 -86
- package/lib/js/control/CompassButton.d.ts +16 -0
- package/{src/control/CompassButton.ts → lib/js/control/CompassButton.js} +18 -43
- package/lib/js/control/Control.d.ts +100 -0
- package/{src/control/Control.ts → lib/js/control/Control.js} +22 -89
- package/lib/js/control/DebugInfo.d.ts +25 -0
- package/{src/control/DebugInfo.ts → lib/js/control/DebugInfo.js} +38 -84
- package/lib/js/control/DrawingSwitcher.d.ts +13 -0
- package/{src/control/DrawingSwitcher.ts → lib/js/control/DrawingSwitcher.js} +13 -30
- package/lib/js/control/EarthCoordinates.d.ts +41 -0
- package/{src/control/EarthCoordinates.ts → lib/js/control/EarthCoordinates.js} +58 -119
- package/lib/js/control/EarthNavigation.d.ts +50 -0
- package/{src/control/EarthNavigation.ts → lib/js/control/EarthNavigation.js} +70 -161
- package/lib/js/control/GeoImageDragControl.d.ts +22 -0
- package/{src/control/GeoImageDragControl.ts → lib/js/control/GeoImageDragControl.js} +26 -49
- package/lib/js/control/KeyboardNavigation.d.ts +28 -0
- package/{src/control/KeyboardNavigation.ts → lib/js/control/KeyboardNavigation.js} +67 -92
- package/lib/js/control/LayerAnimation.d.ts +71 -0
- package/{src/control/LayerAnimation.ts → lib/js/control/LayerAnimation.js} +82 -162
- package/lib/js/control/LayerSwitcher.d.ts +21 -0
- package/{src/control/LayerSwitcher.ts → lib/js/control/LayerSwitcher.js} +16 -41
- package/lib/js/control/Lighting.d.ts +49 -0
- package/{src/control/Lighting.ts → lib/js/control/Lighting.js} +106 -219
- package/lib/js/control/MouseNavigation.d.ts +62 -0
- package/{src/control/MouseNavigation.ts → lib/js/control/MouseNavigation.js} +105 -211
- package/lib/js/control/MouseWheelZoomControl.d.ts +44 -0
- package/lib/js/control/MouseWheelZoomControl.js +181 -0
- package/lib/js/control/RulerSwitcher.d.ts +17 -0
- package/{src/control/RulerSwitcher.ts → lib/js/control/RulerSwitcher.js} +13 -28
- package/lib/js/control/ScaleControl.d.ts +24 -0
- package/lib/js/control/ScaleControl.js +91 -0
- package/lib/js/control/SegmentBoundVisualization.d.ts +12 -0
- package/lib/js/control/SegmentBoundVisualization.js +37 -0
- package/lib/js/control/ShowFps.d.ts +9 -0
- package/lib/js/control/ShowFps.js +20 -0
- package/lib/js/control/SimpleNavigation.d.ts +25 -0
- package/{src/control/SimpleNavigation.ts → lib/js/control/SimpleNavigation.js} +29 -51
- package/lib/js/control/SimpleSkyBackground.d.ts +15 -0
- package/{src/control/SimpleSkyBackground.ts → lib/js/control/SimpleSkyBackground.js} +21 -48
- package/lib/js/control/Sun.d.ts +33 -0
- package/{src/control/Sun.ts → lib/js/control/Sun.js} +34 -85
- package/lib/js/control/ToggleWireframe.d.ts +14 -0
- package/lib/js/control/ToggleWireframe.js +28 -0
- package/lib/js/control/TouchNavigation.d.ts +52 -0
- package/{src/control/TouchNavigation.ts → lib/js/control/TouchNavigation.js} +88 -193
- package/lib/js/control/ZoomControl.d.ts +27 -0
- package/{src/control/ZoomControl.ts → lib/js/control/ZoomControl.js} +25 -50
- package/lib/js/control/drawing/DrawingControl.d.ts +12 -0
- package/{src/control/drawing/DrawingControl.ts → lib/js/control/drawing/DrawingControl.js} +10 -20
- package/lib/js/control/drawing/LineStringDrawingScene.d.ts +15 -0
- package/{src/control/drawing/LineStringDrawingScene.ts → lib/js/control/drawing/LineStringDrawingScene.js} +28 -85
- package/lib/js/control/drawing/PolygonDrawingScene.d.ts +98 -0
- package/{src/control/drawing/PolygonDrawingScene.ts → lib/js/control/drawing/PolygonDrawingScene.js} +190 -388
- package/lib/js/control/elevationProfile/ElevationProfile.d.ts +61 -0
- package/{src/control/elevationProfile/ElevationProfile.ts → lib/js/control/elevationProfile/ElevationProfile.js} +56 -148
- package/lib/js/control/heightRuler/HeightRuler.d.ts +7 -0
- package/{src/control/heightRuler/HeightRuler.ts → lib/js/control/heightRuler/HeightRuler.js} +4 -9
- package/lib/js/control/heightRuler/HeightRulerScene.d.ts +35 -0
- package/{src/control/heightRuler/HeightRulerScene.ts → lib/js/control/heightRuler/HeightRulerScene.js} +47 -99
- package/lib/js/control/heightRuler/HeightRulerSwitcher.d.ts +6 -0
- package/{src/control/heightRuler/HeightRulerSwitcher.ts → lib/js/control/heightRuler/HeightRulerSwitcher.js} +2 -4
- package/{src/control/index.ts → lib/js/control/index.d.ts} +1 -18
- package/lib/js/control/index.js +28 -0
- package/lib/js/control/ruler/Ruler.d.ts +13 -0
- package/lib/js/control/ruler/Ruler.js +23 -0
- package/lib/js/control/ruler/RulerScene.d.ts +88 -0
- package/lib/js/control/ruler/RulerScene.js +324 -0
- package/lib/js/control/selection/Selection.d.ts +55 -0
- package/{src/control/selection/Selection.ts → lib/js/control/selection/Selection.js} +15 -34
- package/lib/js/control/selection/SelectionScene.d.ts +44 -0
- package/{src/control/selection/SelectionScene.ts → lib/js/control/selection/SelectionScene.js} +26 -113
- package/lib/js/control/timeline/TimelineControl.d.ts +18 -0
- package/{src/control/timeline/TimelineControl.ts → lib/js/control/timeline/TimelineControl.js} +13 -43
- package/lib/js/control/timeline/TimelineModel.d.ts +41 -0
- package/{src/control/timeline/TimelineModel.ts → lib/js/control/timeline/TimelineModel.js} +26 -74
- package/lib/js/control/timeline/TimelineView.d.ts +85 -0
- package/{src/control/timeline/TimelineView.ts → lib/js/control/timeline/TimelineView.js} +133 -281
- package/lib/js/control/timeline/timelineUtils.d.ts +12 -0
- package/lib/js/control/timeline/timelineUtils.js +112 -0
- package/lib/js/control/visibleExtent/Segment.d.ts +277 -0
- package/{src → lib/js}/control/visibleExtent/Segment.js +145 -698
- package/lib/js/control/visibleExtent/VisibleExtent.d.ts +5 -0
- package/{src → lib/js}/control/visibleExtent/VisibleExtent.js +1 -18
- package/lib/js/control/visibleExtent/drawnode.d.ts +7 -0
- package/{src/control/visibleExtent/drawnode.ts → lib/js/control/visibleExtent/drawnode.js} +1 -28
- package/lib/js/ellipsoid/Ellipsoid.d.ts +187 -0
- package/{src/ellipsoid/Ellipsoid.ts → lib/js/ellipsoid/Ellipsoid.js} +85 -267
- package/lib/js/ellipsoid/index.d.ts +3 -0
- package/lib/js/ellipsoid/index.js +3 -0
- package/lib/js/ellipsoid/wgs84.d.ts +6 -0
- package/{src/ellipsoid/wgs84.ts → lib/js/ellipsoid/wgs84.js} +1 -2
- package/lib/js/entity/BaseBillboard.d.ts +222 -0
- package/{src/entity/BaseBillboard.ts → lib/js/entity/BaseBillboard.js} +48 -165
- package/lib/js/entity/BaseBillboardHandler.d.ts +81 -0
- package/{src/entity/BaseBillboardHandler.ts → lib/js/entity/BaseBillboardHandler.js} +139 -365
- package/lib/js/entity/Billboard.d.ts +113 -0
- package/{src/entity/Billboard.ts → lib/js/entity/Billboard.js} +19 -83
- package/lib/js/entity/BillboardHandler.d.ts +15 -0
- package/{src/entity/BillboardHandler.ts → lib/js/entity/BillboardHandler.js} +27 -59
- package/lib/js/entity/Entity.d.ts +354 -0
- package/{src/entity/Entity.ts → lib/js/entity/Entity.js} +102 -374
- package/lib/js/entity/EntityCollection.d.ts +363 -0
- package/{src/entity/EntityCollection.ts → lib/js/entity/EntityCollection.js} +57 -359
- package/lib/js/entity/GeoObject.d.ts +138 -0
- package/{src/entity/GeoObject.ts → lib/js/entity/GeoObject.js} +41 -146
- package/lib/js/entity/GeoObjectHandler.d.ts +99 -0
- package/{src/entity/GeoObjectHandler.ts → lib/js/entity/GeoObjectHandler.js} +162 -423
- package/lib/js/entity/Geometry.d.ts +111 -0
- package/lib/js/entity/Geometry.js +283 -0
- package/lib/js/entity/GeometryHandler.d.ts +84 -0
- package/{src/entity/GeometryHandler.ts → lib/js/entity/GeometryHandler.js} +162 -657
- package/lib/js/entity/Label.d.ts +207 -0
- package/{src/entity/Label.ts → lib/js/entity/Label.js} +63 -165
- package/lib/js/entity/LabelHandler.d.ts +65 -0
- package/{src/entity/LabelHandler.ts → lib/js/entity/LabelHandler.js} +175 -408
- package/lib/js/entity/LabelWorker.d.ts +15 -0
- package/{src/entity/LabelWorker.ts → lib/js/entity/LabelWorker.js} +24 -45
- package/lib/js/entity/PointCloud.d.ts +179 -0
- package/{src/entity/PointCloud.ts → lib/js/entity/PointCloud.js} +65 -265
- package/lib/js/entity/PointCloudHandler.d.ts +42 -0
- package/{src/entity/PointCloudHandler.ts → lib/js/entity/PointCloudHandler.js} +19 -62
- package/lib/js/entity/Polyline.d.ts +337 -0
- package/{src/entity/Polyline.ts → lib/js/entity/Polyline.js} +289 -924
- package/lib/js/entity/PolylineHandler.d.ts +22 -0
- package/{src/entity/PolylineHandler.ts → lib/js/entity/PolylineHandler.js} +12 -37
- package/lib/js/entity/Ray.d.ts +133 -0
- package/{src/entity/Ray.ts → lib/js/entity/Ray.js} +26 -146
- package/lib/js/entity/RayHandler.d.ts +70 -0
- package/{src/entity/RayHandler.ts → lib/js/entity/RayHandler.js} +102 -342
- package/lib/js/entity/Strip.d.ts +127 -0
- package/{src/entity/Strip.ts → lib/js/entity/Strip.js} +102 -372
- package/lib/js/entity/StripHandler.d.ts +42 -0
- package/{src/entity/StripHandler.ts → lib/js/entity/StripHandler.js} +22 -74
- package/{src/entity/index.ts → lib/js/entity/index.d.ts} +1 -2
- package/lib/js/entity/index.js +11 -0
- package/lib/js/index.d.ts +33 -0
- package/lib/js/index.js +33 -0
- package/lib/js/input/KeyboardHandler.d.ts +33 -0
- package/{src/input/KeyboardHandler.ts → lib/js/input/KeyboardHandler.js} +45 -84
- package/lib/js/input/MouseHandler.d.ts +16 -0
- package/{src/input/MouseHandler.ts → lib/js/input/MouseHandler.js} +12 -36
- package/lib/js/input/TouchHandler.d.ts +11 -0
- package/{src/input/TouchHandler.ts → lib/js/input/TouchHandler.js} +11 -23
- package/lib/js/input/input.d.ts +3 -0
- package/{src/input/input.ts → lib/js/input/input.js} +1 -1
- package/lib/js/layer/BaseGeoImage.d.ts +145 -0
- package/{src/layer/BaseGeoImage.ts → lib/js/layer/BaseGeoImage.js} +70 -235
- package/lib/js/layer/CanvasTiles.d.ts +103 -0
- package/{src/layer/CanvasTiles.ts → lib/js/layer/CanvasTiles.js} +54 -146
- package/lib/js/layer/GeoImage.d.ts +61 -0
- package/{src/layer/GeoImage.ts → lib/js/layer/GeoImage.js} +24 -54
- package/lib/js/layer/GeoTexture2d.d.ts +17 -0
- package/lib/js/layer/GeoTexture2d.js +37 -0
- package/lib/js/layer/GeoVideo.d.ts +68 -0
- package/{src/layer/GeoVideo.ts → lib/js/layer/GeoVideo.js} +31 -61
- package/lib/js/layer/KML.d.ts +72 -0
- package/{src/layer/KML.ts → lib/js/layer/KML.js} +94 -138
- package/lib/js/layer/Layer.d.ts +401 -0
- package/{src/layer/Layer.ts → lib/js/layer/Layer.js} +92 -443
- package/lib/js/layer/Material.d.ts +34 -0
- package/{src/layer/Material.ts → lib/js/layer/Material.js} +9 -43
- package/lib/js/layer/Vector.d.ts +243 -0
- package/{src/layer/Vector.ts → lib/js/layer/Vector.js} +155 -426
- package/lib/js/layer/WMS.d.ts +75 -0
- package/{src/layer/WMS.ts → lib/js/layer/WMS.js} +18 -100
- package/lib/js/layer/XYZ.d.ts +149 -0
- package/{src/layer/XYZ.ts → lib/js/layer/XYZ.js} +71 -171
- package/lib/js/layer/index.d.ts +11 -0
- package/lib/js/layer/index.js +11 -0
- package/lib/js/light/LightSource.d.ts +174 -0
- package/{src/light/LightSource.ts → lib/js/light/LightSource.js} +22 -131
- package/lib/js/math/Line2.d.ts +11 -0
- package/{src/math/Line2.ts → lib/js/math/Line2.js} +5 -15
- package/lib/js/math/Line3.d.ts +28 -0
- package/lib/js/math/Line3.js +85 -0
- package/lib/js/math/Mat3.d.ts +77 -0
- package/{src/math/Mat3.ts → lib/js/math/Mat3.js} +22 -51
- package/lib/js/math/Mat4.d.ts +195 -0
- package/{src/math/Mat4.ts → lib/js/math/Mat4.js} +53 -219
- package/lib/js/math/Plane.d.ts +20 -0
- package/{src/math/Plane.ts → lib/js/math/Plane.js} +26 -40
- package/lib/js/math/Quat.d.ts +373 -0
- package/{src/math/Quat.ts → lib/js/math/Quat.js} +106 -319
- package/lib/js/math/Ray.d.ts +76 -0
- package/{src/math/Ray.ts → lib/js/math/Ray.js} +21 -66
- package/lib/js/math/Vec2.d.ts +310 -0
- package/{src/math/Vec2.ts → lib/js/math/Vec2.js} +55 -121
- package/lib/js/math/Vec3.d.ts +472 -0
- package/{src/math/Vec3.ts → lib/js/math/Vec3.js} +103 -236
- package/lib/js/math/Vec4.d.ts +163 -0
- package/{src/math/Vec4.ts → lib/js/math/Vec4.js} +23 -79
- package/lib/js/math/coder.d.ts +51 -0
- package/{src/math/coder.ts → lib/js/math/coder.js} +14 -20
- package/lib/js/math/index.d.ts +11 -0
- package/lib/js/math/index.js +11 -0
- package/lib/js/math.d.ts +266 -0
- package/{src/math.ts → lib/js/math.js} +37 -85
- package/lib/js/mercator.d.ts +92 -0
- package/{src/mercator.ts → lib/js/mercator.js} +13 -37
- package/lib/js/proj/EPSG3857.d.ts +9 -0
- package/{src/proj/EPSG3857.ts → lib/js/proj/EPSG3857.js} +0 -2
- package/lib/js/proj/EPSG4326.d.ts +9 -0
- package/{src/proj/EPSG4326.ts → lib/js/proj/EPSG4326.js} +0 -2
- package/lib/js/proj/Proj.d.ts +43 -0
- package/{src/proj/Proj.ts → lib/js/proj/Proj.js} +4 -29
- package/lib/js/quadTree/EPSG4326QuadTreeStrategy.d.ts +6 -0
- package/lib/js/quadTree/EPSG4326QuadTreeStrategy.js +17 -0
- package/lib/js/quadTree/EarthQuadTreeStrategy.d.ts +6 -0
- package/lib/js/quadTree/EarthQuadTreeStrategy.js +19 -0
- package/lib/js/quadTree/EntityCollectionNode.d.ts +54 -0
- package/{src/quadTree/EntityCollectionNode.ts → lib/js/quadTree/EntityCollectionNode.js} +83 -150
- package/lib/js/quadTree/MarsQuadTreeStrategy.d.ts +6 -0
- package/lib/js/quadTree/MarsQuadTreeStrategy.js +17 -0
- package/lib/js/quadTree/Node.d.ts +61 -0
- package/{src/quadTree/Node.ts → lib/js/quadTree/Node.js} +140 -357
- package/lib/js/quadTree/QuadTreeStrategy.d.ts +25 -0
- package/{src/quadTree/QuadTreeStrategy.ts → lib/js/quadTree/QuadTreeStrategy.js} +13 -44
- package/lib/js/quadTree/Wgs84QuadTreeStrategy.d.ts +6 -0
- package/lib/js/quadTree/Wgs84QuadTreeStrategy.js +15 -0
- package/lib/js/quadTree/index.d.ts +12 -0
- package/lib/js/quadTree/index.js +12 -0
- package/lib/js/quadTree/quadTree.d.ts +40 -0
- package/{src/quadTree/quadTree.ts → lib/js/quadTree/quadTree.js} +0 -9
- package/lib/js/renderer/Renderer.d.ts +320 -0
- package/{src/renderer/Renderer.ts → lib/js/renderer/Renderer.js} +265 -622
- package/lib/js/renderer/RendererEvents.d.ts +239 -0
- package/{src/renderer/RendererEvents.ts → lib/js/renderer/RendererEvents.js} +158 -472
- package/lib/js/scene/Axes.d.ts +12 -0
- package/lib/js/scene/Axes.js +59 -0
- package/lib/js/scene/BaseNode.d.ts +61 -0
- package/{src/scene/BaseNode.ts → lib/js/scene/BaseNode.js} +11 -57
- package/lib/js/scene/Planet.d.ts +623 -0
- package/{src/scene/Planet.ts → lib/js/scene/Planet.js} +257 -937
- package/lib/js/scene/RenderNode.d.ts +150 -0
- package/{src/scene/RenderNode.ts → lib/js/scene/RenderNode.js} +33 -138
- package/lib/js/scene/SkyBox.d.ts +13 -0
- package/{src/scene/SkyBox.ts → lib/js/scene/SkyBox.js} +16 -37
- package/{src/scene/index.ts → lib/js/scene/index.d.ts} +0 -1
- package/lib/js/scene/index.js +5 -0
- package/lib/js/segment/Segment.d.ts +278 -0
- package/{src/segment/Segment.ts → lib/js/segment/Segment.js} +242 -913
- package/lib/js/segment/SegmentLonLat.d.ts +48 -0
- package/{src/segment/SegmentLonLat.ts → lib/js/segment/SegmentLonLat.js} +58 -132
- package/lib/js/segment/SegmentLonLatWgs84.d.ts +10 -0
- package/lib/js/segment/SegmentLonLatWgs84.js +23 -0
- package/lib/js/segment/Slice.d.ts +13 -0
- package/{src/segment/Slice.ts → lib/js/segment/Slice.js} +4 -22
- package/lib/js/segment/segmentHelper.d.ts +18 -0
- package/{src/segment/segmentHelper.ts → lib/js/segment/segmentHelper.js} +30 -88
- package/lib/js/shaders/atmos.d.ts +4 -0
- package/{src/shaders/atmos.ts → lib/js/shaders/atmos.js} +8 -26
- package/lib/js/shaders/billboard.d.ts +3 -0
- package/{src/shaders/billboard.ts → lib/js/shaders/billboard.js} +9 -18
- package/lib/js/shaders/bloom.d.ts +2 -0
- package/{src/shaders/bloom.ts → lib/js/shaders/bloom.js} +5 -8
- package/lib/js/shaders/blur.d.ts +3 -0
- package/{src/shaders/blur.ts → lib/js/shaders/blur.js} +11 -19
- package/lib/js/shaders/depth.d.ts +2 -0
- package/{src/shaders/depth.ts → lib/js/shaders/depth.js} +3 -6
- package/lib/js/shaders/drawnode.d.ts +8 -0
- package/{src/shaders/drawnode.ts → lib/js/shaders/drawnode.js} +23 -75
- package/lib/js/shaders/geoObject.d.ts +3 -0
- package/{src/shaders/geoObject.ts → lib/js/shaders/geoObject.js} +51 -63
- package/lib/js/shaders/label.d.ts +4 -0
- package/{src/shaders/label.ts → lib/js/shaders/label.js} +12 -25
- package/lib/js/shaders/lumFilter.d.ts +2 -0
- package/{src/shaders/lumFilter.ts → lib/js/shaders/lumFilter.js} +4 -7
- package/lib/js/shaders/pickingMask.d.ts +2 -0
- package/{src/shaders/pickingMask.ts → lib/js/shaders/pickingMask.js} +5 -8
- package/lib/js/shaders/pointCloud.d.ts +2 -0
- package/{src/shaders/pointCloud.ts → lib/js/shaders/pointCloud.js} +4 -7
- package/lib/js/shaders/polyline.d.ts +3 -0
- package/{src/shaders/polyline.ts → lib/js/shaders/polyline.js} +7 -22
- package/lib/js/shaders/ray.d.ts +2 -0
- package/{src/shaders/ray.ts → lib/js/shaders/ray.js} +4 -7
- package/lib/js/shaders/screenFrame.d.ts +2 -0
- package/{src/shaders/screenFrame.ts → lib/js/shaders/screenFrame.js} +5 -8
- package/lib/js/shaders/skybox.d.ts +2 -0
- package/{src/shaders/skybox.ts → lib/js/shaders/skybox.js} +10 -13
- package/lib/js/shaders/toneMapping.d.ts +2 -0
- package/{src/shaders/toneMapping.ts → lib/js/shaders/toneMapping.js} +5 -8
- package/lib/js/shaders/utils.d.ts +1 -0
- package/{src/shaders/utils.ts → lib/js/shaders/utils.js} +1 -1
- package/lib/js/terrain/BilTerrain.d.ts +18 -0
- package/{src/terrain/BilTerrain.ts → lib/js/terrain/BilTerrain.js} +21 -118
- package/lib/js/terrain/EmptyTerrain.d.ts +106 -0
- package/{src/terrain/EmptyTerrain.ts → lib/js/terrain/EmptyTerrain.js} +20 -144
- package/lib/js/terrain/Geoid.d.ts +33 -0
- package/lib/js/terrain/Geoid.js +191 -0
- package/lib/js/terrain/GlobusTerrain.d.ts +134 -0
- package/{src/terrain/GlobusTerrain.ts → lib/js/terrain/GlobusTerrain.js} +84 -241
- package/lib/js/terrain/MapboxTerrain.d.ts +21 -0
- package/{src/terrain/MapboxTerrain.ts → lib/js/terrain/MapboxTerrain.js} +46 -215
- package/{src/terrain/index.ts → lib/js/terrain/index.d.ts} +0 -1
- package/lib/js/terrain/index.js +5 -0
- package/lib/js/ui/Button.d.ts +32 -0
- package/lib/js/ui/Button.js +78 -0
- package/lib/js/ui/ButtonGroup.d.ts +16 -0
- package/lib/js/ui/ButtonGroup.js +41 -0
- package/lib/js/ui/Dialog.d.ts +55 -0
- package/lib/js/ui/Dialog.js +173 -0
- package/lib/js/ui/Slider.d.ts +38 -0
- package/lib/js/ui/Slider.js +129 -0
- package/lib/js/ui/ToggleButton.d.ts +20 -0
- package/lib/js/ui/ToggleButton.js +42 -0
- package/lib/js/ui/View.d.ts +37 -0
- package/{src/ui/View.ts → lib/js/ui/View.js} +31 -77
- package/lib/js/ui/icons.d.ts +1 -0
- package/{src/ui/icons.ts → lib/js/ui/icons.js} +1 -1
- package/lib/js/utils/BaseWorker.d.ts +14 -0
- package/{src/utils/BaseWorker.ts → lib/js/utils/BaseWorker.js} +15 -28
- package/lib/js/utils/FontAtlas.d.ts +82 -0
- package/{src/utils/FontAtlas.ts → lib/js/utils/FontAtlas.js} +46 -182
- package/lib/js/utils/GeoImageCreator.d.ts +34 -0
- package/{src/utils/GeoImageCreator.ts → lib/js/utils/GeoImageCreator.js} +34 -91
- package/lib/js/utils/ImagesCacheManager.d.ts +22 -0
- package/{src/utils/ImagesCacheManager.ts → lib/js/utils/ImagesCacheManager.js} +16 -38
- package/lib/js/utils/Loader.d.ts +63 -0
- package/lib/js/utils/Loader.js +156 -0
- package/lib/js/utils/NormalMapCreator.d.ts +52 -0
- package/{src/utils/NormalMapCreator.ts → lib/js/utils/NormalMapCreator.js} +64 -195
- package/lib/js/utils/PlainSegmentWorker.d.ts +24 -0
- package/{src/utils/PlainSegmentWorker.ts → lib/js/utils/PlainSegmentWorker.js} +24 -56
- package/lib/js/utils/TerrainWorker.d.ts +28 -0
- package/{src/utils/TerrainWorker.ts → lib/js/utils/TerrainWorker.js} +19 -56
- package/lib/js/utils/TextureAtlas.d.ts +113 -0
- package/{src/utils/TextureAtlas.ts → lib/js/utils/TextureAtlas.js} +40 -131
- package/lib/js/utils/VectorTileCreator.d.ts +18 -0
- package/{src/utils/VectorTileCreator.ts → lib/js/utils/VectorTileCreator.js} +61 -147
- package/lib/js/utils/colorTable.d.ts +3 -0
- package/{src/utils/colorTable.ts → lib/js/utils/colorTable.js} +2 -2
- package/lib/js/utils/earcut.d.ts +7 -0
- package/{src/utils/earcut.ts → lib/js/utils/earcut.js} +95 -223
- package/lib/js/utils/objParser.d.ts +24 -0
- package/{src/utils/objParser.ts → lib/js/utils/objParser.js} +38 -93
- package/lib/js/utils/shared.d.ts +267 -0
- package/{src/utils/shared.ts → lib/js/utils/shared.js} +185 -342
- package/lib/js/utils/units.d.ts +16 -0
- package/lib/js/utils/units.js +61 -0
- package/lib/js/webgl/BaseFramebuffer.d.ts +53 -0
- package/{src/webgl/BaseFramebuffer.ts → lib/js/webgl/BaseFramebuffer.js} +22 -59
- package/lib/js/webgl/Framebuffer.d.ts +69 -0
- package/{src/webgl/Framebuffer.ts → lib/js/webgl/Framebuffer.js} +30 -87
- package/lib/js/webgl/Handler.d.ts +473 -0
- package/{src/webgl/Handler.ts → lib/js/webgl/Handler.js} +175 -586
- package/lib/js/webgl/Multisample.d.ts +27 -0
- package/lib/js/webgl/Multisample.js +77 -0
- package/lib/js/webgl/Program.d.ts +159 -0
- package/{src/webgl/Program.ts → lib/js/webgl/Program.js} +73 -210
- package/lib/js/webgl/ProgramController.d.ts +86 -0
- package/{src/webgl/ProgramController.ts → lib/js/webgl/ProgramController.js} +11 -45
- package/{src/webgl/index.ts → lib/js/webgl/index.d.ts} +1 -8
- package/lib/js/webgl/index.js +6 -0
- package/lib/js/webgl/types.d.ts +9 -0
- package/{src/webgl/types.ts → lib/js/webgl/types.js} +5 -8
- package/lib/js/webgl/variableHandlers.d.ts +22 -0
- package/lib/js/webgl/variableHandlers.js +78 -0
- package/package.json +23 -34
- package/dist/@openglobus/og.esm.js +0 -2
- package/dist/@openglobus/og.esm.js.map +0 -1
- package/dist/@openglobus/og.umd.js +0 -2
- package/dist/@openglobus/og.umd.js.map +0 -1
- package/src/Deferred.ts +0 -17
- package/src/control/MouseWheelZoomControl.ts +0 -269
- package/src/control/ScaleControl.ts +0 -131
- package/src/control/SegmentBoundVisualization.ts +0 -50
- package/src/control/ShowFps.ts +0 -28
- package/src/control/ToggleWireframe.ts +0 -35
- package/src/control/ruler/Ruler.ts +0 -35
- package/src/control/ruler/RulerScene.ts +0 -437
- package/src/control/timeline/timelineUtils.ts +0 -133
- package/src/ellipsoid/index.ts +0 -4
- package/src/entity/Geometry.ts +0 -486
- package/src/index.ts +0 -173
- package/src/layer/GeoTexture2d.ts +0 -56
- package/src/layer/index.ts +0 -12
- package/src/math/Line3.ts +0 -162
- package/src/math/index.ts +0 -26
- package/src/quadTree/EPSG4326QuadTreeStrategy.ts +0 -24
- package/src/quadTree/EarthQuadTreeStrategy.ts +0 -28
- package/src/quadTree/MarsQuadTreeStrategy.ts +0 -25
- package/src/quadTree/Wgs84QuadTreeStrategy.ts +0 -22
- package/src/quadTree/index.ts +0 -14
- package/src/scene/Axes.ts +0 -78
- package/src/segment/SegmentLonLatWgs84.ts +0 -33
- package/src/terrain/Geoid.ts +0 -273
- package/src/ui/Button.ts +0 -121
- package/src/ui/ButtonGroup.ts +0 -63
- package/src/ui/Dialog.ts +0 -244
- package/src/ui/Slider.ts +0 -188
- package/src/ui/ToggleButton.ts +0 -68
- package/src/utils/Loader.ts +0 -247
- package/src/utils/units.ts +0 -78
- package/src/webgl/Multisample.ts +0 -153
- package/src/webgl/variableHandlers.ts +0 -114
- /package/{dist → lib}/@openglobus/og.css +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Bold.json +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Bold.ttf.cfg +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Bold.ttf.png +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Light.json +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Light.ttf.cfg +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Light.ttf.png +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Medium.json +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Medium.ttf.cfg +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Medium.ttf.png +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/NotoSansArabic-Regular.json +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.cfg +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.png +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Roboto-Regular.json +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Roboto-Regular.ttf.cfg +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Roboto-Regular.ttf.png +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/arial.js +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/arial.json +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/arial.ttf.cfg +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/arial.ttf.png +0 -0
- /package/{dist → lib}/@openglobus/res/night-4326.png +0 -0
- /package/{dist → lib}/@openglobus/res/night.png +0 -0
- /package/{dist → lib}/@openglobus/res/spec.png +0 -0
|
@@ -1,39 +1,16 @@
|
|
|
1
1
|
import * as mercator from "../mercator";
|
|
2
2
|
import * as utils from "../utils/shared";
|
|
3
|
-
import {Billboard
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {IPolylineParams, Polyline} from "./Polyline";
|
|
15
|
-
import {IRayParams, Ray} from "./Ray";
|
|
16
|
-
import {Strip, IStripParams} from "./Strip";
|
|
17
|
-
import {Vector, VectorEventsType} from "../layer/Vector";
|
|
18
|
-
import {EntityCollectionNode} from "../quadTree/EntityCollectionNode";
|
|
19
|
-
|
|
20
|
-
export interface IEntityParams {
|
|
21
|
-
name?: string;
|
|
22
|
-
properties?: any;
|
|
23
|
-
cartesian?: Vec3 | NumberArray3;
|
|
24
|
-
lonlat?: LonLat | NumberArray3 | NumberArray2;
|
|
25
|
-
altitude?: number;
|
|
26
|
-
visibility?: boolean;
|
|
27
|
-
billboard?: Billboard | IBillboardParams;
|
|
28
|
-
label?: Label | ILabelParams;
|
|
29
|
-
polyline?: Polyline | IPolylineParams;
|
|
30
|
-
ray?: Ray | IRayParams;
|
|
31
|
-
pointCloud?: PointCloud | IPointCloudParams;
|
|
32
|
-
geometry?: Geometry | IGeometryParams;
|
|
33
|
-
geoObject?: GeoObject | IGeoObjectParams;
|
|
34
|
-
strip?: Strip;
|
|
35
|
-
}
|
|
36
|
-
|
|
3
|
+
import { Billboard } from "./Billboard";
|
|
4
|
+
import { Extent } from "../Extent";
|
|
5
|
+
import { Geometry } from "./Geometry";
|
|
6
|
+
import { GeoObject } from "./GeoObject";
|
|
7
|
+
import { LonLat } from "../LonLat";
|
|
8
|
+
import { Label } from "./Label";
|
|
9
|
+
import { Vec3 } from "../math/Vec3";
|
|
10
|
+
import { PointCloud } from "./PointCloud";
|
|
11
|
+
import { Polyline } from "./Polyline";
|
|
12
|
+
import { Ray } from "./Ray";
|
|
13
|
+
import { Strip } from "./Strip";
|
|
37
14
|
/**
|
|
38
15
|
* Entity instances aggregate multiple forms of visualization into a single high-level object.
|
|
39
16
|
* They can be created manually and added to entity collection.
|
|
@@ -54,202 +31,23 @@ export interface IEntityParams {
|
|
|
54
31
|
* @param {*} [options.properties] - Entity custom properties.
|
|
55
32
|
*/
|
|
56
33
|
class Entity {
|
|
57
|
-
|
|
58
|
-
static __counter__: number = 0;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Uniq identifier.
|
|
62
|
-
* @public
|
|
63
|
-
* @readonly
|
|
64
|
-
*/
|
|
65
|
-
protected __id: number;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Entity user defined properties.
|
|
69
|
-
* @public
|
|
70
|
-
* @type {Object}
|
|
71
|
-
*/
|
|
72
|
-
public properties: any;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Children entities.
|
|
77
|
-
* @public
|
|
78
|
-
* @type {Array.<Entity>}
|
|
79
|
-
*/
|
|
80
|
-
public childrenNodes: Entity[];
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Parent entity.
|
|
84
|
-
* @public
|
|
85
|
-
* @type {Entity}
|
|
86
|
-
*/
|
|
87
|
-
public parent: Entity | null;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Entity cartesian position.
|
|
91
|
-
* @protected
|
|
92
|
-
* @type {Vec3}
|
|
93
|
-
*/
|
|
94
|
-
public _cartesian: Vec3;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Geodetic entity coordinates.
|
|
98
|
-
* @public
|
|
99
|
-
* @type {LonLat}
|
|
100
|
-
*/
|
|
101
|
-
public _lonLat: LonLat;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* World Mercator entity coordinates.
|
|
105
|
-
* @public
|
|
106
|
-
* @type {LonLat}
|
|
107
|
-
*/
|
|
108
|
-
public _lonLatMerc: LonLat;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Entity visible terrain altitude.
|
|
112
|
-
* @public
|
|
113
|
-
* @type {number}
|
|
114
|
-
*/
|
|
115
|
-
public _altitude: number;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Visibility flag.
|
|
119
|
-
* @protected
|
|
120
|
-
* @type {boolean}
|
|
121
|
-
*/
|
|
122
|
-
protected _visibility: boolean;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Entity collection that this entity belongs to.
|
|
126
|
-
* @public
|
|
127
|
-
* @type {EntityCollection}
|
|
128
|
-
*/
|
|
129
|
-
public _entityCollection: EntityCollection | null;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Entity collection array store index.
|
|
133
|
-
* @public
|
|
134
|
-
* @type {number}
|
|
135
|
-
*/
|
|
136
|
-
public _entityCollectionIndex: number;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Assigned vector layer pointer.
|
|
140
|
-
* @public
|
|
141
|
-
* @type {Vector}
|
|
142
|
-
*/
|
|
143
|
-
public _layer: Vector | null;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Assigned vector layer entity array index.
|
|
147
|
-
* @public
|
|
148
|
-
* @type {number}
|
|
149
|
-
*/
|
|
150
|
-
public _layerIndex: number;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Picking color.
|
|
154
|
-
* @public
|
|
155
|
-
* @type {Vec3}
|
|
156
|
-
*/
|
|
157
|
-
public _pickingColor: Vec3;
|
|
158
|
-
|
|
159
|
-
protected _featureConstructorArray: Record<string, [any, Function]>;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Billboard entity.
|
|
163
|
-
* @public
|
|
164
|
-
* @type {Billboard | null}
|
|
165
|
-
*/
|
|
166
|
-
public billboard: Billboard | null;
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Text label entity.
|
|
170
|
-
* @public
|
|
171
|
-
* @type {Label | null}
|
|
172
|
-
*/
|
|
173
|
-
public label: Label | null;
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Polyline entity.
|
|
177
|
-
* @public
|
|
178
|
-
* @type {Polyline | null}
|
|
179
|
-
*/
|
|
180
|
-
public polyline: Polyline | null;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Ray entity.
|
|
184
|
-
* @public
|
|
185
|
-
* @type {Ray | null}
|
|
186
|
-
*/
|
|
187
|
-
public ray: Ray | null;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* PointCloud entity.
|
|
191
|
-
* @public
|
|
192
|
-
* @type {PointCloud | null}
|
|
193
|
-
*/
|
|
194
|
-
public pointCloud: PointCloud | null;
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Geometry entity(available for vector layer only).
|
|
198
|
-
* @public
|
|
199
|
-
* @type {Geometry | null}
|
|
200
|
-
*/
|
|
201
|
-
public geometry: Geometry | null;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Geo object entity
|
|
205
|
-
* @public
|
|
206
|
-
* @type {Geometry | null}
|
|
207
|
-
*/
|
|
208
|
-
public geoObject: GeoObject | null;
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Strip entity.
|
|
212
|
-
* @public
|
|
213
|
-
* @type {Strip | null}
|
|
214
|
-
*/
|
|
215
|
-
public strip: Strip | null;
|
|
216
|
-
|
|
217
|
-
public _nodePtr?: EntityCollectionNode;
|
|
218
|
-
|
|
219
|
-
constructor(options: IEntityParams = {}) {
|
|
220
|
-
|
|
34
|
+
constructor(options = {}) {
|
|
221
35
|
options.properties = options.properties || {};
|
|
222
|
-
|
|
223
36
|
this.__id = Entity.__counter__++;
|
|
224
|
-
|
|
225
37
|
this.properties = options.properties || {};
|
|
226
|
-
|
|
227
38
|
this.properties.name = this.properties.name != undefined ? this.properties.name : "";
|
|
228
|
-
|
|
229
39
|
this.childrenNodes = [];
|
|
230
|
-
|
|
231
40
|
this.parent = null;
|
|
232
|
-
|
|
233
41
|
this._cartesian = utils.createVector3(options.cartesian);
|
|
234
|
-
|
|
235
42
|
this._lonLat = utils.createLonLat(options.lonlat);
|
|
236
|
-
|
|
237
43
|
this._lonLatMerc = new LonLat();
|
|
238
|
-
|
|
239
44
|
this._altitude = options.altitude || 0.0;
|
|
240
|
-
|
|
241
45
|
this._visibility = options.visibility != undefined ? options.visibility : true;
|
|
242
|
-
|
|
243
46
|
this._entityCollection = null;
|
|
244
|
-
|
|
245
47
|
this._entityCollectionIndex = -1;
|
|
246
|
-
|
|
247
48
|
this._layer = null;
|
|
248
|
-
|
|
249
49
|
this._layerIndex = -1;
|
|
250
|
-
|
|
251
50
|
this._pickingColor = new Vec3(0, 0, 0);
|
|
252
|
-
|
|
253
51
|
this._featureConstructorArray = {
|
|
254
52
|
billboard: [Billboard, this.setBillboard],
|
|
255
53
|
label: [Label, this.setLabel],
|
|
@@ -260,55 +58,37 @@ class Entity {
|
|
|
260
58
|
strip: [Strip, this.setStrip],
|
|
261
59
|
ray: [Ray, this.setRay]
|
|
262
60
|
};
|
|
263
|
-
|
|
264
|
-
this.
|
|
265
|
-
|
|
266
|
-
this.
|
|
267
|
-
|
|
268
|
-
this.
|
|
269
|
-
|
|
270
|
-
this.
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
this.geometry = this._createOptionFeature<Geometry, IGeometryParams>("geometry", options.geometry);
|
|
275
|
-
|
|
276
|
-
this.geoObject = this._createOptionFeature<GeoObject, IGeoObjectParams>("geoObject", options.geoObject);
|
|
277
|
-
|
|
278
|
-
this.strip = this._createOptionFeature<Strip, IStripParams>("strip", options.strip);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
public get id(): number {
|
|
61
|
+
this.billboard = this._createOptionFeature("billboard", options.billboard);
|
|
62
|
+
this.label = this._createOptionFeature("label", options.label);
|
|
63
|
+
this.polyline = this._createOptionFeature("polyline", options.polyline);
|
|
64
|
+
this.ray = this._createOptionFeature("ray", options.ray);
|
|
65
|
+
this.pointCloud = this._createOptionFeature("pointCloud", options.pointCloud);
|
|
66
|
+
this.geometry = this._createOptionFeature("geometry", options.geometry);
|
|
67
|
+
this.geoObject = this._createOptionFeature("geoObject", options.geoObject);
|
|
68
|
+
this.strip = this._createOptionFeature("strip", options.strip);
|
|
69
|
+
}
|
|
70
|
+
get id() {
|
|
282
71
|
return this.__id;
|
|
283
72
|
}
|
|
284
|
-
|
|
285
|
-
public isEqual(entity: Entity): boolean {
|
|
73
|
+
isEqual(entity) {
|
|
286
74
|
return this.__id === entity.__id;
|
|
287
75
|
}
|
|
288
|
-
|
|
289
|
-
public get layerIndex(): number {
|
|
76
|
+
get layerIndex() {
|
|
290
77
|
return this._layerIndex;
|
|
291
78
|
}
|
|
292
|
-
|
|
293
|
-
public get instanceName(): string {
|
|
79
|
+
get instanceName() {
|
|
294
80
|
return "Entity";
|
|
295
81
|
}
|
|
296
|
-
|
|
297
|
-
protected _createOptionFeature<T, K>(
|
|
298
|
-
featureName: string,
|
|
299
|
-
options?: T | K
|
|
300
|
-
): T | null {
|
|
82
|
+
_createOptionFeature(featureName, options) {
|
|
301
83
|
if (options) {
|
|
302
84
|
let c = this._featureConstructorArray[featureName];
|
|
303
|
-
return c[1].call(this, new c[0](options))
|
|
85
|
+
return c[1].call(this, new c[0](options));
|
|
304
86
|
}
|
|
305
87
|
return null;
|
|
306
88
|
}
|
|
307
|
-
|
|
308
|
-
public getCollectionIndex(): number {
|
|
89
|
+
getCollectionIndex() {
|
|
309
90
|
return this._entityCollectionIndex;
|
|
310
91
|
}
|
|
311
|
-
|
|
312
92
|
/**
|
|
313
93
|
* Adds current entity into the specified entity collection.
|
|
314
94
|
* @public
|
|
@@ -316,69 +96,57 @@ class Entity {
|
|
|
316
96
|
* @param {Boolean} [rightNow=false] - Entity insertion option for vector layer.
|
|
317
97
|
* @returns {Entity} - This object.
|
|
318
98
|
*/
|
|
319
|
-
|
|
99
|
+
addTo(collection, rightNow = false) {
|
|
320
100
|
collection.add(this, rightNow);
|
|
321
101
|
return this;
|
|
322
102
|
}
|
|
323
|
-
|
|
324
103
|
/**
|
|
325
104
|
* Removes current entity from collection and layer.
|
|
326
105
|
* @public
|
|
327
106
|
*/
|
|
328
|
-
|
|
107
|
+
remove() {
|
|
329
108
|
this._layer && this._layer.removeEntity(this);
|
|
330
109
|
this._entityCollection && this._entityCollection.removeEntity(this);
|
|
331
110
|
}
|
|
332
|
-
|
|
333
111
|
/**
|
|
334
112
|
* Sets the entity visibility.
|
|
335
113
|
* @public
|
|
336
114
|
* @param {boolean} visibility - Entity visibility.
|
|
337
115
|
*/
|
|
338
|
-
|
|
116
|
+
setVisibility(visibility) {
|
|
339
117
|
this._visibility = visibility;
|
|
340
|
-
|
|
341
118
|
// billboards
|
|
342
119
|
this.billboard && this.billboard.setVisibility(visibility);
|
|
343
|
-
|
|
344
120
|
// geoObject
|
|
345
121
|
this.geoObject && this.geoObject.setVisibility(visibility);
|
|
346
|
-
|
|
347
122
|
// labels
|
|
348
123
|
this.label && this.label.setVisibility(visibility);
|
|
349
|
-
|
|
350
124
|
// polyline
|
|
351
125
|
this.polyline && this.polyline.setVisibility(visibility);
|
|
352
|
-
|
|
353
126
|
// ray
|
|
354
127
|
this.ray && this.ray.setVisibility(visibility);
|
|
355
|
-
|
|
356
128
|
// geometry
|
|
357
129
|
this.geometry && this.geometry.setVisibility(visibility);
|
|
358
|
-
|
|
359
130
|
for (let i = 0; i < this.childrenNodes.length; i++) {
|
|
360
131
|
this.childrenNodes[i].setVisibility(visibility);
|
|
361
132
|
}
|
|
362
133
|
}
|
|
363
|
-
|
|
364
134
|
/**
|
|
365
135
|
* Returns entity visibility.
|
|
366
136
|
* @public
|
|
367
137
|
* @returns {boolean} -
|
|
368
138
|
*/
|
|
369
|
-
|
|
139
|
+
getVisibility() {
|
|
370
140
|
return this._visibility;
|
|
371
141
|
}
|
|
372
|
-
|
|
373
142
|
/**
|
|
374
143
|
* Sets entity cartesian position.
|
|
375
144
|
* @public
|
|
376
145
|
* @param {Vec3} cartesian - Cartesian position in 3d space.
|
|
377
146
|
*/
|
|
378
|
-
|
|
147
|
+
setCartesian3v(cartesian) {
|
|
379
148
|
this.setCartesian(cartesian.x, cartesian.y, cartesian.z);
|
|
380
149
|
}
|
|
381
|
-
|
|
382
150
|
/**
|
|
383
151
|
* Sets entity cartesian position.
|
|
384
152
|
* @public
|
|
@@ -386,114 +154,93 @@ class Entity {
|
|
|
386
154
|
* @param {number} y - 3d space Y - position.
|
|
387
155
|
* @param {number} z - 3d space Z - position.
|
|
388
156
|
*/
|
|
389
|
-
|
|
157
|
+
setCartesian(x, y, z) {
|
|
390
158
|
let p = this._cartesian;
|
|
391
|
-
|
|
392
159
|
p.x = x || 0.0;
|
|
393
160
|
p.y = y || 0.0;
|
|
394
161
|
p.z = z || 0.0;
|
|
395
|
-
|
|
396
162
|
// billboards
|
|
397
163
|
this.billboard && this.billboard.setPosition3v(p);
|
|
398
|
-
|
|
399
164
|
// geoObject
|
|
400
165
|
this.geoObject && this.geoObject.setPosition3v(p);
|
|
401
|
-
|
|
402
166
|
// labels
|
|
403
167
|
this.label && this.label.setPosition3v(p);
|
|
404
|
-
|
|
405
168
|
for (let i = 0; i < this.childrenNodes.length; i++) {
|
|
406
169
|
this.childrenNodes[i].setCartesian(x, y, z);
|
|
407
170
|
}
|
|
408
|
-
|
|
409
171
|
let ec = this._entityCollection;
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
this._lonLat = (ec.renderNode as Planet).ellipsoid.cartesianToLonLat(p);
|
|
413
|
-
|
|
172
|
+
if (ec && ec.renderNode && ec.renderNode.ellipsoid) {
|
|
173
|
+
this._lonLat = ec.renderNode.ellipsoid.cartesianToLonLat(p);
|
|
414
174
|
if (Math.abs(this._lonLat.lat) < mercator.MAX_LAT) {
|
|
415
175
|
this._lonLatMerc = this._lonLat.forwardMercator();
|
|
416
|
-
}
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
417
178
|
this._lonLatMerc.lon = this._lonLatMerc.lat = this._lonLatMerc.height = 0;
|
|
418
179
|
}
|
|
419
180
|
}
|
|
420
|
-
|
|
421
|
-
ec && ec.events.dispatch(ec.events.entitymove, this);
|
|
181
|
+
//ec && ec.events.dispatch(ec.events.entitymove, this);
|
|
422
182
|
}
|
|
423
|
-
|
|
424
183
|
/**
|
|
425
184
|
* Sets entity cartesian position without event dispatching.
|
|
426
185
|
* @public
|
|
427
186
|
* @param {Vec3} cartesian - Cartesian position in 3d space.
|
|
428
187
|
* @param {boolean} skipLonLat - skip geodetic calculation.
|
|
429
188
|
*/
|
|
430
|
-
|
|
189
|
+
_setCartesian3vSilent(cartesian, skipLonLat = false) {
|
|
431
190
|
let p = this._cartesian;
|
|
432
|
-
|
|
433
191
|
p.x = cartesian.x || 0.0;
|
|
434
192
|
p.y = cartesian.y || 0.0;
|
|
435
193
|
p.z = cartesian.z || 0.0;
|
|
436
|
-
|
|
437
194
|
// billboards
|
|
438
195
|
this.billboard && this.billboard.setPosition3v(p);
|
|
439
|
-
|
|
440
196
|
// geoObject
|
|
441
197
|
this.geoObject && this.geoObject.setPosition3v(p);
|
|
442
|
-
|
|
443
198
|
// labels
|
|
444
199
|
this.label && this.label.setPosition3v(p);
|
|
445
|
-
|
|
446
200
|
for (let i = 0; i < this.childrenNodes.length; i++) {
|
|
447
201
|
this.childrenNodes[i].setCartesian(p.x, p.y, p.z);
|
|
448
202
|
}
|
|
449
|
-
|
|
450
203
|
let ec = this._entityCollection;
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
this._lonLat = (ec.renderNode as Planet).ellipsoid.cartesianToLonLat(p);
|
|
454
|
-
|
|
204
|
+
if (!skipLonLat && ec && ec.renderNode && ec.renderNode.ellipsoid) {
|
|
205
|
+
this._lonLat = ec.renderNode.ellipsoid.cartesianToLonLat(p);
|
|
455
206
|
if (Math.abs(this._lonLat.lat) < mercator.MAX_LAT) {
|
|
456
207
|
this._lonLatMerc = this._lonLat.forwardMercator();
|
|
457
|
-
}
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
458
210
|
//this._lonLatMerc = null;
|
|
459
211
|
}
|
|
460
212
|
}
|
|
461
213
|
}
|
|
462
|
-
|
|
463
214
|
/**
|
|
464
215
|
* Gets entity geodetic coordinates.
|
|
465
216
|
* @public
|
|
466
217
|
* @returns {LonLat} -
|
|
467
218
|
*/
|
|
468
|
-
|
|
219
|
+
getLonLat() {
|
|
469
220
|
return this._lonLat.clone();
|
|
470
221
|
}
|
|
471
|
-
|
|
472
222
|
/**
|
|
473
223
|
* Sets geodetic coordinates of the entity point object.
|
|
474
224
|
* @public
|
|
475
225
|
* @param {LonLat} lonlat - WGS84 coordinates.
|
|
476
226
|
*/
|
|
477
|
-
|
|
227
|
+
setLonLat(lonlat) {
|
|
478
228
|
let l = this._lonLat;
|
|
479
|
-
|
|
480
229
|
l.lon = lonlat.lon;
|
|
481
230
|
l.lat = lonlat.lat;
|
|
482
231
|
l.height = lonlat.height;
|
|
483
|
-
|
|
484
232
|
let ec = this._entityCollection;
|
|
485
|
-
if (ec && ec.renderNode &&
|
|
233
|
+
if (ec && ec.renderNode && ec.renderNode.ellipsoid) {
|
|
486
234
|
if (Math.abs(l.lat) < mercator.MAX_LAT) {
|
|
487
235
|
this._lonLatMerc = l.forwardMercator();
|
|
488
|
-
}
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
489
238
|
//this._lonLatMerc = null;
|
|
490
239
|
}
|
|
491
|
-
|
|
492
|
-
(ec.renderNode as Planet).ellipsoid.lonLatToCartesianRes(l, this._cartesian);
|
|
240
|
+
ec.renderNode.ellipsoid.lonLatToCartesianRes(l, this._cartesian);
|
|
493
241
|
this.setCartesian3v(this._cartesian);
|
|
494
242
|
}
|
|
495
243
|
}
|
|
496
|
-
|
|
497
244
|
/**
|
|
498
245
|
* Sets geodetic coordinates of the entity point object.
|
|
499
246
|
* @public
|
|
@@ -501,60 +248,54 @@ class Entity {
|
|
|
501
248
|
* @param {number} lat - Latitude
|
|
502
249
|
* @param {number} [height] - Height
|
|
503
250
|
*/
|
|
504
|
-
|
|
251
|
+
setLonLat2(lon, lat, height) {
|
|
505
252
|
let l = this._lonLat;
|
|
506
|
-
|
|
507
253
|
l.lon = lon;
|
|
508
254
|
l.lat = lat;
|
|
509
255
|
l.height = height != undefined ? height : l.height;
|
|
510
|
-
|
|
511
256
|
let ec = this._entityCollection;
|
|
512
|
-
if (ec && ec.renderNode &&
|
|
257
|
+
if (ec && ec.renderNode && ec.renderNode.ellipsoid) {
|
|
513
258
|
if (Math.abs(l.lat) < mercator.MAX_LAT) {
|
|
514
259
|
this._lonLatMerc = l.forwardMercator();
|
|
515
|
-
}
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
516
262
|
this._lonLatMerc.lon = this._lonLatMerc.lat = this._lonLatMerc.height = 0;
|
|
517
263
|
}
|
|
518
|
-
|
|
519
|
-
(ec.renderNode as Planet).ellipsoid.lonLatToCartesianRes(l, this._cartesian);
|
|
264
|
+
ec.renderNode.ellipsoid.lonLatToCartesianRes(l, this._cartesian);
|
|
520
265
|
this.setCartesian3v(this._cartesian);
|
|
521
266
|
}
|
|
522
267
|
}
|
|
523
|
-
|
|
524
268
|
/**
|
|
525
269
|
* Sets entity altitude over the planet.
|
|
526
270
|
* @public
|
|
527
271
|
* @param {number} altitude - Altitude.
|
|
528
272
|
*/
|
|
529
|
-
|
|
273
|
+
setAltitude(altitude) {
|
|
530
274
|
this._altitude = altitude;
|
|
531
275
|
}
|
|
532
|
-
|
|
533
276
|
/**
|
|
534
277
|
* Sets entity altitude over the planet.
|
|
535
278
|
* @public
|
|
536
279
|
* @return {number} Altitude.
|
|
537
280
|
*/
|
|
538
|
-
|
|
281
|
+
getAltitude() {
|
|
539
282
|
return this._altitude;
|
|
540
283
|
}
|
|
541
|
-
|
|
542
284
|
/**
|
|
543
285
|
* Returns cartesian position.
|
|
544
286
|
* @public
|
|
545
287
|
* @returns {Vec3} -
|
|
546
288
|
*/
|
|
547
|
-
|
|
289
|
+
getCartesian() {
|
|
548
290
|
return this._cartesian.clone();
|
|
549
291
|
}
|
|
550
|
-
|
|
551
292
|
/**
|
|
552
293
|
* Sets entity billboard.
|
|
553
294
|
* @public
|
|
554
295
|
* @param {Billboard} billboard - Billboard object.
|
|
555
296
|
* @returns {Billboard} -
|
|
556
297
|
*/
|
|
557
|
-
|
|
298
|
+
setBillboard(billboard) {
|
|
558
299
|
if (this.billboard) {
|
|
559
300
|
this.billboard.remove();
|
|
560
301
|
}
|
|
@@ -565,14 +306,13 @@ class Entity {
|
|
|
565
306
|
this._entityCollection && this._entityCollection.billboardHandler.add(billboard);
|
|
566
307
|
return billboard;
|
|
567
308
|
}
|
|
568
|
-
|
|
569
309
|
/**
|
|
570
310
|
* Sets entity label.
|
|
571
311
|
* @public
|
|
572
312
|
* @param {Label} label - Text label.
|
|
573
313
|
* @returns {Label} -
|
|
574
314
|
*/
|
|
575
|
-
|
|
315
|
+
setLabel(label) {
|
|
576
316
|
if (this.label) {
|
|
577
317
|
this.label.remove();
|
|
578
318
|
}
|
|
@@ -583,14 +323,13 @@ class Entity {
|
|
|
583
323
|
this._entityCollection && this._entityCollection.labelHandler.add(label);
|
|
584
324
|
return label;
|
|
585
325
|
}
|
|
586
|
-
|
|
587
326
|
/**
|
|
588
327
|
* Sets entity ray.
|
|
589
328
|
* @public
|
|
590
329
|
* @param {Ray} ray - Ray object.
|
|
591
330
|
* @returns {Ray} -
|
|
592
331
|
*/
|
|
593
|
-
|
|
332
|
+
setRay(ray) {
|
|
594
333
|
if (this.ray) {
|
|
595
334
|
this.ray.remove();
|
|
596
335
|
}
|
|
@@ -600,14 +339,13 @@ class Entity {
|
|
|
600
339
|
this._entityCollection && this._entityCollection.rayHandler.add(ray);
|
|
601
340
|
return ray;
|
|
602
341
|
}
|
|
603
|
-
|
|
604
342
|
/**
|
|
605
343
|
* Sets entity polyline.
|
|
606
344
|
* @public
|
|
607
345
|
* @param {Polyline} polyline - Polyline object.
|
|
608
346
|
* @returns {Polyline} -
|
|
609
347
|
*/
|
|
610
|
-
|
|
348
|
+
setPolyline(polyline) {
|
|
611
349
|
if (this.polyline) {
|
|
612
350
|
this.polyline.remove();
|
|
613
351
|
}
|
|
@@ -617,14 +355,13 @@ class Entity {
|
|
|
617
355
|
this._entityCollection && this._entityCollection.polylineHandler.add(polyline);
|
|
618
356
|
return polyline;
|
|
619
357
|
}
|
|
620
|
-
|
|
621
358
|
/**
|
|
622
359
|
* Sets entity pointCloud.
|
|
623
360
|
* @public
|
|
624
361
|
* @param {PointCloud} pointCloud - PointCloud object.
|
|
625
362
|
* @returns {PointCloud} -
|
|
626
363
|
*/
|
|
627
|
-
|
|
364
|
+
setPointCloud(pointCloud) {
|
|
628
365
|
if (this.pointCloud) {
|
|
629
366
|
this.pointCloud.remove();
|
|
630
367
|
}
|
|
@@ -634,14 +371,13 @@ class Entity {
|
|
|
634
371
|
this._entityCollection && this._entityCollection.pointCloudHandler.add(pointCloud);
|
|
635
372
|
return pointCloud;
|
|
636
373
|
}
|
|
637
|
-
|
|
638
374
|
/**
|
|
639
375
|
* Sets entity geometry.
|
|
640
376
|
* @public
|
|
641
377
|
* @param {Geometry} geometry - Geometry object.
|
|
642
378
|
* @returns {Geometry} -
|
|
643
379
|
*/
|
|
644
|
-
|
|
380
|
+
setGeometry(geometry) {
|
|
645
381
|
if (this.geometry) {
|
|
646
382
|
this.geometry.remove();
|
|
647
383
|
}
|
|
@@ -651,14 +387,13 @@ class Entity {
|
|
|
651
387
|
this._layer && this._layer.add(this);
|
|
652
388
|
return geometry;
|
|
653
389
|
}
|
|
654
|
-
|
|
655
390
|
/**
|
|
656
391
|
* Sets entity geoObject.
|
|
657
392
|
* @public
|
|
658
393
|
* @param {GeoObject} geoObject - GeoObject.
|
|
659
394
|
* @returns {GeoObject} -
|
|
660
395
|
*/
|
|
661
|
-
|
|
396
|
+
setGeoObject(geoObject) {
|
|
662
397
|
if (this.geoObject) {
|
|
663
398
|
this.geoObject.remove();
|
|
664
399
|
}
|
|
@@ -669,14 +404,13 @@ class Entity {
|
|
|
669
404
|
this._entityCollection && this._entityCollection.geoObjectHandler.add(geoObject);
|
|
670
405
|
return geoObject;
|
|
671
406
|
}
|
|
672
|
-
|
|
673
407
|
/**
|
|
674
408
|
* Sets entity strip.
|
|
675
409
|
* @public
|
|
676
410
|
* @param {Strip} strip - Strip object.
|
|
677
411
|
* @returns {Strip} -
|
|
678
412
|
*/
|
|
679
|
-
|
|
413
|
+
setStrip(strip) {
|
|
680
414
|
if (this.strip) {
|
|
681
415
|
this.strip.remove();
|
|
682
416
|
}
|
|
@@ -686,102 +420,96 @@ class Entity {
|
|
|
686
420
|
this._entityCollection && this._entityCollection.stripHandler.add(strip);
|
|
687
421
|
return strip;
|
|
688
422
|
}
|
|
689
|
-
|
|
690
|
-
public get layer(): Vector | null {
|
|
423
|
+
get layer() {
|
|
691
424
|
return this._layer;
|
|
692
425
|
}
|
|
693
|
-
|
|
694
|
-
public get rendererEvents(): VectorEventsType | EntityCollectionEvents | null {
|
|
426
|
+
get rendererEvents() {
|
|
695
427
|
if (this._layer) {
|
|
696
428
|
return this._layer.events;
|
|
697
|
-
}
|
|
429
|
+
}
|
|
430
|
+
else if (this._entityCollection) {
|
|
698
431
|
return this._entityCollection.events;
|
|
699
432
|
}
|
|
700
433
|
return null;
|
|
701
434
|
}
|
|
702
|
-
|
|
703
435
|
/**
|
|
704
436
|
* Append child entity.
|
|
705
437
|
* @public
|
|
706
438
|
* @param {Entity} entity - Child entity.
|
|
707
439
|
*/
|
|
708
|
-
|
|
440
|
+
appendChild(entity) {
|
|
709
441
|
entity._entityCollection = this._entityCollection;
|
|
710
442
|
entity._pickingColor = this._pickingColor;
|
|
711
443
|
entity.parent = this;
|
|
712
444
|
this.childrenNodes.push(entity);
|
|
713
445
|
this._entityCollection && this._entityCollection.appendChildEntity(entity);
|
|
714
446
|
}
|
|
715
|
-
|
|
716
447
|
/**
|
|
717
448
|
* Appends entity items(billboard, label etc.) picking color.
|
|
718
449
|
* @public
|
|
719
450
|
*/
|
|
720
|
-
|
|
451
|
+
setPickingColor() {
|
|
721
452
|
let c = this._pickingColor;
|
|
722
|
-
|
|
723
453
|
this.billboard && this.billboard.setPickingColor3v(c);
|
|
724
|
-
|
|
725
454
|
this.label && this.label.setPickingColor3v(c);
|
|
726
|
-
|
|
727
455
|
this.polyline && this.polyline.setPickingColor3v(c);
|
|
728
|
-
|
|
729
456
|
this.ray && this.ray.setPickingColor3v(c);
|
|
730
|
-
|
|
731
457
|
this.strip && this.strip.setPickingColor3v(c);
|
|
732
|
-
|
|
733
458
|
this.geoObject && this.geoObject.setPickingColor3v(c);
|
|
734
|
-
|
|
735
459
|
for (let i = 0; i < this.childrenNodes.length; i++) {
|
|
736
460
|
this.childrenNodes[i].setPickingColor();
|
|
737
461
|
}
|
|
738
462
|
}
|
|
739
|
-
|
|
740
463
|
/**
|
|
741
464
|
* Return geodetic extent.
|
|
742
465
|
* @public
|
|
743
466
|
* @returns {Extent} -
|
|
744
467
|
*/
|
|
745
|
-
|
|
746
|
-
|
|
468
|
+
getExtent() {
|
|
747
469
|
let res;
|
|
748
470
|
let c = this._lonLat;
|
|
749
|
-
|
|
750
471
|
if (this.billboard || this.label) {
|
|
751
472
|
res = new Extent(new LonLat(c.lon, c.lat), new LonLat(c.lon, c.lat));
|
|
752
|
-
}
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
753
475
|
res = new Extent(new LonLat(180.0, 90.0), new LonLat(-180.0, -90.0));
|
|
754
476
|
}
|
|
755
|
-
|
|
756
|
-
let sw = res.southWest,
|
|
757
|
-
ne = res.northEast;
|
|
758
|
-
|
|
477
|
+
let sw = res.southWest, ne = res.northEast;
|
|
759
478
|
if (this.polyline) {
|
|
760
479
|
let e = this.polyline.getExtent();
|
|
761
|
-
if (e.southWest.lon < sw.lon)
|
|
762
|
-
|
|
763
|
-
if (e.
|
|
764
|
-
|
|
480
|
+
if (e.southWest.lon < sw.lon)
|
|
481
|
+
sw.lon = e.southWest.lon;
|
|
482
|
+
if (e.southWest.lat < sw.lat)
|
|
483
|
+
sw.lat = e.southWest.lat;
|
|
484
|
+
if (e.northEast.lon > ne.lon)
|
|
485
|
+
ne.lon = e.northEast.lon;
|
|
486
|
+
if (e.northEast.lat > ne.lat)
|
|
487
|
+
ne.lat = e.northEast.lat;
|
|
765
488
|
}
|
|
766
|
-
|
|
767
489
|
if (this.geometry) {
|
|
768
490
|
let e = this.geometry.getExtent();
|
|
769
|
-
if (e.southWest.lon < sw.lon)
|
|
770
|
-
|
|
771
|
-
if (e.
|
|
772
|
-
|
|
491
|
+
if (e.southWest.lon < sw.lon)
|
|
492
|
+
sw.lon = e.southWest.lon;
|
|
493
|
+
if (e.southWest.lat < sw.lat)
|
|
494
|
+
sw.lat = e.southWest.lat;
|
|
495
|
+
if (e.northEast.lon > ne.lon)
|
|
496
|
+
ne.lon = e.northEast.lon;
|
|
497
|
+
if (e.northEast.lat > ne.lat)
|
|
498
|
+
ne.lat = e.northEast.lat;
|
|
773
499
|
}
|
|
774
|
-
|
|
775
500
|
for (let i = 0; i < this.childrenNodes.length; i++) {
|
|
776
501
|
let e = this.childrenNodes[i].getExtent();
|
|
777
|
-
if (e.southWest.lon < sw.lon)
|
|
778
|
-
|
|
779
|
-
if (e.
|
|
780
|
-
|
|
502
|
+
if (e.southWest.lon < sw.lon)
|
|
503
|
+
sw.lon = e.southWest.lon;
|
|
504
|
+
if (e.southWest.lat < sw.lat)
|
|
505
|
+
sw.lat = e.southWest.lat;
|
|
506
|
+
if (e.northEast.lon > ne.lon)
|
|
507
|
+
ne.lon = e.northEast.lon;
|
|
508
|
+
if (e.northEast.lat > ne.lat)
|
|
509
|
+
ne.lat = e.northEast.lat;
|
|
781
510
|
}
|
|
782
|
-
|
|
783
511
|
return res;
|
|
784
512
|
}
|
|
785
513
|
}
|
|
786
|
-
|
|
787
|
-
export {Entity};
|
|
514
|
+
Entity.__counter__ = 0;
|
|
515
|
+
export { Entity };
|