@vcmap/ui 5.0.0-rc.6 → 5.0.0-rc.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.
Files changed (264) hide show
  1. package/README.md +72 -22
  2. package/build/build.js +0 -3
  3. package/build/buildHelpers.js +0 -1
  4. package/build/commonViteConfig.js +1 -1
  5. package/config/aerowest.config.json +2 -1
  6. package/config/base.config.json +7 -7
  7. package/config/dev.config.json +4 -4
  8. package/dist/assets/cesium/Workers/{AttributeCompression-27507afe.js → AttributeCompression-80665726.js} +1 -1
  9. package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-7565c1e8.js → AxisAlignedBoundingBox-a655a4bc.js} +1 -1
  10. package/dist/assets/cesium/Workers/{BoundingRectangle-9d707275.js → BoundingRectangle-c3b79029.js} +1 -1
  11. package/dist/assets/cesium/Workers/{BoxGeometry-fb31d3b5.js → BoxGeometry-f8f9c981.js} +1 -1
  12. package/dist/assets/cesium/Workers/{Color-56bb5728.js → Color-de06a177.js} +1 -1
  13. package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-72143c19.js → CoplanarPolygonGeometryLibrary-48cdc26d.js} +1 -1
  14. package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-7bae1712.js → CorridorGeometryLibrary-ddc027d3.js} +1 -1
  15. package/dist/assets/cesium/Workers/{CylinderGeometry-331891fe.js → CylinderGeometry-82a8cbe6.js} +1 -1
  16. package/dist/assets/cesium/Workers/{EllipseGeometry-5e3f67b6.js → EllipseGeometry-32d55454.js} +1 -1
  17. package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-dbc15162.js → EllipseGeometryLibrary-b2ae188a.js} +1 -1
  18. package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-21191fce.js → EllipseOutlineGeometry-f05a5a27.js} +1 -1
  19. package/dist/assets/cesium/Workers/{EllipsoidGeodesic-cc3bace8.js → EllipsoidGeodesic-19e75e11.js} +1 -1
  20. package/dist/assets/cesium/Workers/{EllipsoidGeometry-8bfa24a9.js → EllipsoidGeometry-7c99fc81.js} +1 -1
  21. package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-48d9c023.js → EllipsoidOutlineGeometry-21c243df.js} +1 -1
  22. package/dist/assets/cesium/Workers/{EllipsoidRhumbLine-125a8b72.js → EllipsoidRhumbLine-6145377b.js} +1 -1
  23. package/dist/assets/cesium/Workers/EllipsoidTangentPlane-a01286f6.js +1 -0
  24. package/dist/assets/cesium/Workers/{EncodedCartesian3-96fdc0ef.js → EncodedCartesian3-d9f5c4a4.js} +1 -1
  25. package/dist/assets/cesium/Workers/{FrustumGeometry-9ab86004.js → FrustumGeometry-17776af8.js} +1 -1
  26. package/dist/assets/cesium/Workers/GeometryAttribute-89a520b9.js +1 -0
  27. package/dist/assets/cesium/Workers/{GeometryInstance-13e4ff38.js → GeometryInstance-4fbf16ba.js} +1 -1
  28. package/dist/assets/cesium/Workers/{GeometryPipeline-e0eb4567.js → GeometryPipeline-309fad76.js} +1 -1
  29. package/dist/assets/cesium/Workers/IntersectionTests-58aa8f80.js +1 -0
  30. package/dist/assets/cesium/Workers/{Matrix2-37e55508.js → Matrix2-47e98d76.js} +0 -0
  31. package/dist/assets/cesium/Workers/{OrientedBoundingBox-e9c07538.js → OrientedBoundingBox-fcb5b750.js} +1 -1
  32. package/dist/assets/cesium/Workers/{Plane-6ee42cab.js → Plane-3f01019d.js} +1 -1
  33. package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-b408c688.js → PolygonGeometryLibrary-0b29eb16.js} +1 -1
  34. package/dist/assets/cesium/Workers/{PolygonPipeline-7b8e4643.js → PolygonPipeline-a934c4dd.js} +1 -1
  35. package/dist/assets/cesium/Workers/{PolylinePipeline-6757400c.js → PolylinePipeline-8095c9bc.js} +1 -1
  36. package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-eb972210.js → PolylineVolumeGeometryLibrary-67d12fff.js} +1 -1
  37. package/dist/assets/cesium/Workers/{PrimitivePipeline-f244975e.js → PrimitivePipeline-980e44c5.js} +1 -1
  38. package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-1bd6152a.js → RectangleGeometryLibrary-621c6de8.js} +1 -1
  39. package/dist/assets/cesium/Workers/{TerrainEncoding-5a21a97f.js → TerrainEncoding-f96552d5.js} +1 -1
  40. package/dist/assets/cesium/Workers/{Transforms-eb5c1a84.js → Transforms-c8cb8f43.js} +3 -3
  41. package/dist/assets/cesium/Workers/{WallGeometryLibrary-a6b6a368.js → WallGeometryLibrary-c03d8479.js} +1 -1
  42. package/dist/assets/cesium/Workers/{WebMercatorProjection-2839e524.js → WebMercatorProjection-79b3214e.js} +1 -1
  43. package/dist/assets/cesium/Workers/combineGeometry.js +1 -1
  44. package/dist/assets/cesium/Workers/createBoxGeometry.js +1 -1
  45. package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +1 -1
  46. package/dist/assets/cesium/Workers/createCircleGeometry.js +1 -1
  47. package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +1 -1
  48. package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +1 -1
  49. package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
  50. package/dist/assets/cesium/Workers/createCorridorGeometry.js +1 -1
  51. package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +1 -1
  52. package/dist/assets/cesium/Workers/createCylinderGeometry.js +1 -1
  53. package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +1 -1
  54. package/dist/assets/cesium/Workers/createEllipseGeometry.js +1 -1
  55. package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +1 -1
  56. package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +1 -1
  57. package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
  58. package/dist/assets/cesium/Workers/createFrustumGeometry.js +1 -1
  59. package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +1 -1
  60. package/dist/assets/cesium/Workers/createGeometry.js +1 -1
  61. package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1 -1
  62. package/dist/assets/cesium/Workers/createPlaneGeometry.js +1 -1
  63. package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +1 -1
  64. package/dist/assets/cesium/Workers/createPolygonGeometry.js +1 -1
  65. package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +1 -1
  66. package/dist/assets/cesium/Workers/createPolylineGeometry.js +1 -1
  67. package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +1 -1
  68. package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
  69. package/dist/assets/cesium/Workers/createRectangleGeometry.js +1 -1
  70. package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +1 -1
  71. package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +1 -1
  72. package/dist/assets/cesium/Workers/createSphereGeometry.js +1 -1
  73. package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +1 -1
  74. package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +1 -1
  75. package/dist/assets/cesium/Workers/createVectorTileGeometries.js +1 -1
  76. package/dist/assets/cesium/Workers/createVectorTilePoints.js +1 -1
  77. package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
  78. package/dist/assets/cesium/Workers/createVectorTilePolylines.js +1 -1
  79. package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
  80. package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +1 -1
  81. package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
  82. package/dist/assets/cesium/Workers/createWallGeometry.js +1 -1
  83. package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +1 -1
  84. package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1 -1
  85. package/dist/assets/{cesium.fba8ca.js → cesium.4e40f4.js} +955 -968
  86. package/dist/assets/cesium.js +1 -1
  87. package/dist/assets/core.edcf5e.js +4 -0
  88. package/dist/assets/core.js +1 -1
  89. package/dist/assets/{index.6a83278e.js → index.889d0f3a.js} +1 -1
  90. package/dist/assets/{ol.abea3a.js → ol.246fd4.js} +0 -0
  91. package/dist/assets/ol.js +1 -1
  92. package/dist/assets/ui.df4f6d.css +1 -0
  93. package/dist/assets/ui.df4f6d.js +43 -0
  94. package/dist/assets/ui.js +1 -1
  95. package/dist/assets/{vue-composition-api.7051d7.js → vue-composition-api.a520f3.js} +1 -1
  96. package/dist/assets/vue-composition-api.js +2 -2
  97. package/dist/assets/{vue.9fd7f6.js → vue.2cee44.js} +0 -0
  98. package/dist/assets/vue.js +1 -1
  99. package/dist/assets/{vuetify.33dafc.css → vuetify.cc817b.css} +1 -1
  100. package/dist/assets/{vuetify.33dafc.js → vuetify.cc817b.js} +1 -1
  101. package/dist/assets/vuetify.js +2 -2
  102. package/dist/index.html +1 -1
  103. package/index.js +96 -6
  104. package/package.json +3 -4
  105. package/plugins/@vcmap/pluginExample/index.js +5 -5
  106. package/plugins/@vcmap/pluginExample/pluginExampleComponent.vue +1 -1
  107. package/plugins/@vcmap/project-selector/ContextsListComponent.vue +1 -1
  108. package/plugins/@vcmap/project-selector/index.js +5 -5
  109. package/plugins/@vcmap/project-selector/package.json +1 -2
  110. package/plugins/@vcmap/theme-changer/index.js +6 -6
  111. package/plugins/buttonExamples/ButtonExamples.vue +1 -1
  112. package/plugins/buttonExamples/index.js +5 -4
  113. package/plugins/categoryTest/Categories.vue +1 -1
  114. package/plugins/categoryTest/Category.vue +1 -1
  115. package/plugins/categoryTest/index.js +5 -5
  116. package/plugins/example/index.js +33 -14
  117. package/plugins/test/allIconsComponent.vue +34 -0
  118. package/plugins/test/editor.vue +1 -1
  119. package/plugins/test/index.js +40 -17
  120. package/plugins/test/toolbox-data.js +106 -26
  121. package/plugins/test/windowManagerExample.vue +1 -2
  122. package/src/actions/actionHelper.js +41 -1
  123. package/src/actions/styleSelector.vue +1 -1
  124. package/src/application/Navbar.vue +47 -6
  125. package/src/application/VcsApp.vue +37 -29
  126. package/src/application/VcsMap.vue +1 -20
  127. package/src/assets/logo-mobile.svg +9 -0
  128. package/src/assets/logo.svg +23 -23
  129. package/src/components/buttons/VcsActionButtonList.vue +99 -0
  130. package/src/components/buttons/VcsButton.vue +201 -0
  131. package/src/components/form-inputs-controls/VcsCheckbox.vue +73 -0
  132. package/src/components/form-inputs-controls/VcsColorPicker.vue +81 -0
  133. package/src/components/form-inputs-controls/VcsFormSection.vue +46 -0
  134. package/src/components/form-inputs-controls/VcsLabel.vue +38 -0
  135. package/src/components/form-inputs-controls/VcsSelect.vue +97 -0
  136. package/src/components/form-inputs-controls/VcsTextArea.vue +130 -0
  137. package/src/components/form-inputs-controls/VcsTextField.vue +129 -0
  138. package/src/components/form-output/VcsFormattedNumber.vue +103 -0
  139. package/src/components/lists/VcsActionList.vue +100 -0
  140. package/src/components/lists/VcsTreeview.vue +109 -0
  141. package/src/components/lists/VcsTreeviewLeaf.vue +105 -0
  142. package/src/components/lists/VcsTreeviewSearchbar.vue +156 -0
  143. package/src/components/notification/VcsBadge.vue +27 -0
  144. package/src/components/notification/VcsTooltip.vue +154 -0
  145. package/src/components/notification/validation.js +19 -0
  146. package/src/contentTree/LayerTree.vue +1 -1
  147. package/src/contentTree/contentTreeCollection.js +6 -2
  148. package/src/icons/+all.js +359 -0
  149. package/src/icons/2DAreaIcon.vue +21 -0
  150. package/src/icons/2DDistanceIcon.vue +18 -0
  151. package/src/icons/3DAreaIcon.vue +21 -0
  152. package/src/icons/3DDistanceIcon.vue +18 -0
  153. package/src/icons/3DHeightIcon.vue +18 -0
  154. package/src/icons/AngleIcon.vue +8 -0
  155. package/src/icons/AssociationsIcon.vue +34 -0
  156. package/src/icons/AxisIcon.vue +10 -0
  157. package/src/icons/BoundingBoxIcon.vue +15 -0
  158. package/src/icons/CheckboxCheckedIcon.vue +16 -0
  159. package/src/icons/CheckboxIcon.vue +23 -0
  160. package/src/icons/CheckboxIndeterminateIcon.vue +24 -0
  161. package/src/icons/CircleIcon.vue +10 -0
  162. package/src/icons/ColorSwatchIcon.vue +17 -0
  163. package/src/icons/CommentIcon.vue +19 -0
  164. package/src/icons/CompassIcon.vue +8 -0
  165. package/src/icons/ComponentsIcon.vue +7 -0
  166. package/src/icons/ConeIcon.vue +11 -0
  167. package/src/icons/DimensionsHouseIcon.vue +14 -0
  168. package/src/icons/ElevationProfileIcon.vue +111 -0
  169. package/src/icons/ExportAreaIcon.vue +7 -0
  170. package/src/icons/ExportFlightIcon.vue +7 -0
  171. package/src/icons/ExportIcon.vue +8 -0
  172. package/src/icons/ExternalLinkIcon.vue +10 -0
  173. package/src/icons/EyeIcon.vue +7 -0
  174. package/src/icons/FastForwardIcon.vue +7 -0
  175. package/src/icons/FilterIcon.vue +8 -0
  176. package/src/icons/GlobeNatureIcon.vue +14 -0
  177. package/src/icons/HealthCareIndustriesIcon.vue +118 -0
  178. package/src/icons/HelpIcon.vue +7 -0
  179. package/src/icons/HomePointIcon.vue +8 -0
  180. package/src/icons/HospitalsIcon.vue +237 -0
  181. package/src/icons/HouseIcon.vue +25 -0
  182. package/src/icons/ImportIcon.vue +8 -0
  183. package/src/icons/InfoIcon.vue +10 -0
  184. package/src/icons/KebabIcon.vue +36 -0
  185. package/src/icons/LabelIcon.vue +7 -0
  186. package/src/icons/LayersIcon.vue +26 -0
  187. package/src/icons/LegendIcon.vue +65 -0
  188. package/src/icons/LineIcon.vue +7 -0
  189. package/src/icons/LinkIcon.vue +7 -0
  190. package/src/icons/MapIcon.vue +8 -0
  191. package/src/icons/MenuIcon.vue +34 -0
  192. package/src/icons/MinusIcon.vue +8 -0
  193. package/src/icons/ObjectAttributeIcon.vue +18 -0
  194. package/src/icons/ObjectSelectIcon.vue +8 -0
  195. package/src/icons/ObliqueViewIcon.vue +13 -0
  196. package/src/icons/PdfIcon.vue +10 -0
  197. package/src/icons/PedestrianIcon.vue +8 -0
  198. package/src/icons/PenIcon.vue +14 -0
  199. package/src/icons/PlayCircleIcon.vue +10 -0
  200. package/src/icons/PlusIcon.vue +9 -0
  201. package/src/icons/PoiIcon.vue +7 -0
  202. package/src/icons/PointSelectIcon.vue +7 -0
  203. package/src/icons/PolygonIcon.vue +38 -0
  204. package/src/icons/PresentationModeIcon.vue +7 -0
  205. package/src/icons/ProgressIcon.vue +24 -0
  206. package/src/icons/QueryIcon.vue +15 -0
  207. package/src/icons/RectangleIcon.vue +9 -0
  208. package/src/icons/ReturnIcon.vue +7 -0
  209. package/src/icons/RewindIcon.vue +6 -0
  210. package/src/icons/SearchIcon.vue +8 -0
  211. package/src/icons/ShadowIcon.vue +9 -0
  212. package/src/icons/ShapesIcon.vue +28 -0
  213. package/src/icons/ShareIcon.vue +22 -0
  214. package/src/icons/SimpleCircleFilledIcon.vue +15 -0
  215. package/src/icons/SimpleCircleHalfFilledIcon.vue +12 -0
  216. package/src/icons/SimpleCircleOutlinedIcon.vue +15 -0
  217. package/src/icons/SkipNextIcon.vue +7 -0
  218. package/src/icons/SkipPreviousIcon.vue +9 -0
  219. package/src/icons/SplitViewIcon.vue +19 -0
  220. package/src/icons/TextStyleIcon.vue +14 -0
  221. package/src/icons/ThreeDimensionsIcon.vue +7 -0
  222. package/src/icons/ToolsIcon.vue +35 -0
  223. package/src/icons/TouchIcon.vue +8 -0
  224. package/src/icons/TrashCanIcon.vue +7 -0
  225. package/src/icons/TriangleIcon.vue +15 -0
  226. package/src/icons/TwoDimensionsIcon.vue +8 -0
  227. package/src/icons/UploadIcon.vue +14 -0
  228. package/src/icons/VideoRecorderIcon.vue +14 -0
  229. package/src/icons/WalkingIcon.vue +7 -0
  230. package/src/icons/WallIcon.vue +14 -0
  231. package/src/manager/buttonManager.js +5 -52
  232. package/src/manager/navbarManager.js +81 -0
  233. package/src/manager/toolbox/ToolboxGroupComponent.vue +128 -0
  234. package/src/manager/toolbox/ToolboxManager.vue +119 -76
  235. package/src/manager/toolbox/toolboxManager.js +204 -0
  236. package/src/manager/window/WindowComponent.vue +27 -20
  237. package/src/manager/window/WindowComponentHeader.vue +13 -6
  238. package/src/manager/window/WindowManager.vue +18 -1
  239. package/src/manager/window/windowManager.js +3 -5
  240. package/src/navigation/mapNavigation.vue +34 -5
  241. package/src/navigation/orientationToolsButton.vue +1 -1
  242. package/src/navigation/overviewMap.js +616 -0
  243. package/src/navigation/overviewMapClickedInteraction.js +38 -0
  244. package/src/navigation/tiltSlider.vue +1 -1
  245. package/src/styles/_theming.scss +10 -0
  246. package/src/styles/main.scss +3 -0
  247. package/src/styles/variables.scss +70 -0
  248. package/src/styles/vcsFont.scss +5 -0
  249. package/src/styles/vcsGrid.scss +4 -0
  250. package/src/vcsUiApp.js +18 -3
  251. package/src/vuePlugins/vuetify.js +1 -1
  252. package/dist/assets/cesium/Workers/EllipsoidTangentPlane-678e34e4.js +0 -1
  253. package/dist/assets/cesium/Workers/GeometryAttribute-3915ea0b.js +0 -1
  254. package/dist/assets/cesium/Workers/IntersectionTests-ac2459de.js +0 -1
  255. package/dist/assets/core.d5ed0f.js +0 -4
  256. package/dist/assets/ui.ad1ec9.css +0 -1
  257. package/dist/assets/ui.ad1ec9.js +0 -39
  258. package/dist/assets/uicomponents.161461.css +0 -1
  259. package/dist/assets/uicomponents.161461.js +0 -31
  260. package/dist/assets/uicomponents.js +0 -1
  261. package/lib/uicomponents.js +0 -1
  262. package/src/manager/toolbox/ToolboxMultiSelectButton.vue +0 -96
  263. package/src/manager/toolbox/ToolboxSingleSelectButton.vue +0 -98
  264. package/src/manager/toolbox/toolbox-manager.js +0 -203
@@ -0,0 +1,616 @@
1
+ import {
2
+ OpenlayersMap,
3
+ CesiumMap,
4
+ ObliqueMap,
5
+ VectorLayer,
6
+ VectorStyleItem,
7
+ Projection,
8
+ mercatorProjection,
9
+ EventHandler,
10
+ DataState,
11
+ emptyStyle,
12
+ Extent,
13
+ ViewPoint,
14
+ deserializeLayer,
15
+ } from '@vcmap/core';
16
+ import Point from 'ol/geom/Point';
17
+ import Feature from 'ol/Feature';
18
+ import { Math as CesiumMath, Color } from '@vcmap/cesium';
19
+ import { unByKey } from 'ol/Observable.js';
20
+ import VectorSource from 'ol/source/Vector.js';
21
+ import { WindowSlot } from '../manager/window/windowManager.js';
22
+ import OverviewMapClickedInteraction from './overviewMapClickedInteraction.js';
23
+ import { vuetify } from '../vuePlugins/vuetify.js';
24
+ import { vcsAppSymbol } from '../pluginHelper.js';
25
+ import VcsMap from '../application/VcsMap.vue';
26
+
27
+ /**
28
+ * @returns {WindowComponentOptions}
29
+ */
30
+ export function getWindowComponentOptions() {
31
+ return {
32
+ component: VcsMap,
33
+ props: { mapId: 'overview-map-container' },
34
+ slot: WindowSlot.DETACHED,
35
+ id: 'overview-map-container',
36
+ state: {
37
+ hideHeader: true,
38
+ },
39
+ position: {
40
+ right: '100px',
41
+ bottom: '25px',
42
+ width: '272px',
43
+ height: '223px',
44
+ },
45
+ };
46
+ }
47
+
48
+ /**
49
+ * A 2D OverviewMap for cesium, openlayers and oblique map.
50
+ * Baselayers are added to the OverviewMap using `showInOverviewMap` flag within the properties bag of a layer configuration.
51
+ * @class
52
+ */
53
+ class OverviewMap {
54
+ /**
55
+ * @param {VcsUiApp} app
56
+ */
57
+ constructor(app) {
58
+ /**
59
+ * @type {VcsUiApp}
60
+ * @private
61
+ */
62
+ this._app = app;
63
+
64
+ /**
65
+ * @type {boolean}
66
+ * @private
67
+ */
68
+ this._active = false;
69
+
70
+ /**
71
+ * @type {import("@vcmap/core").OpenlayersMap||null}
72
+ * @private
73
+ */
74
+ this._map = new OpenlayersMap({
75
+ target: 'overview-map-container',
76
+ });
77
+
78
+ /**
79
+ * @private
80
+ * @type {import("@vcmap/core").ViewPoint|null}
81
+ */
82
+ this._cachedViewPoint = null;
83
+
84
+ /**
85
+ * @type {import("@vcmap/core").VectorLayer}
86
+ * @private
87
+ */
88
+ this._obliqueTileLayer = null;
89
+
90
+ /**
91
+ * @type {import("@vcmap/core").VectorLayer}
92
+ * @private
93
+ */
94
+ this._obliqueImageLayer = null;
95
+
96
+ /**
97
+ * @type {import("@vcmap/core").VectorLayer}
98
+ * @private
99
+ */
100
+ this._obliqueSelectedImageLayer = null;
101
+
102
+ const { primary, accent } = vuetify.userPreset.theme.themes.light;
103
+ const fillColor = Color.fromCssColorString(accent);
104
+
105
+ /**
106
+ * @type {VectorStyleItem}
107
+ */
108
+ this.obliqueUnselectedStyle = new VectorStyleItem({
109
+ fill: {
110
+ color: fillColor.withAlpha(0.1).toCssColorString(),
111
+ },
112
+ stroke: {
113
+ color: primary,
114
+ width: 1,
115
+ },
116
+ });
117
+
118
+ /**
119
+ * @type {VectorStyleItem}
120
+ */
121
+ this.obliqueSelectedStyle = new VectorStyleItem({
122
+ fill: {
123
+ color: fillColor.withAlpha(0.8).toCssColorString(),
124
+ },
125
+ stroke: {
126
+ color: primary,
127
+ width: 3,
128
+ },
129
+ });
130
+
131
+ /**
132
+ * A factor by witch to multiply the resolution when zooming to a single oblique image.
133
+ * @type {number}
134
+ * @private
135
+ */
136
+ this._obliqueResolutionFactor = 2;
137
+
138
+ /**
139
+ * @type {import("@vcmap/core").ObliqueViewDirection}
140
+ * @private
141
+ */
142
+ this._obliqueViewDirection = null;
143
+
144
+ /**
145
+ * @type {import("@vcmap/core").VectorLayer}
146
+ * @private
147
+ */
148
+ this._cameraIconLayer = null;
149
+
150
+ /**
151
+ * The style of the camera icon in 2D and 3D
152
+ * @type {import("@vcmap/core").VectorStyleItem}
153
+ */
154
+ this.cameraIconStyle = new VectorStyleItem({
155
+ image: {
156
+ src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA8CAYAAADxJz2MAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6b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KuxBjhFaScNK1dXVcm5uTpw9e5axYszs7Kyora2VII1fvz1ucIGveSmnI8fIbB9uaGiob2pqWlMoFMTIyMh/COzo6LBZOzs7Ow8NDQ1xo+DZtOvc/5twRD5KBJ2wbXtkdHS03NPT8w/4Ox1boMDyCbor21bLTctVRmItkuGqffv2Lezdu/d5STI+Pj7V3d1NSjnC25GvieUud0ZgiHC93LR7927enBL9/f2seYOEL1bbjf4twAD8sqEzJ5yLRwAAAABJRU5ErkJggg==',
157
+ anchor: [0.5, 1],
158
+ },
159
+ });
160
+
161
+ /**
162
+ * The minimum height to give to the overview map when synchronizing the view in 2D and 3D
163
+ * @type {number}
164
+ */
165
+ this.minimumHeight = 150;
166
+
167
+ /**
168
+ * Handles the events from the overview map. Available after first activation.
169
+ * @type {EventHandler|null}
170
+ * @private
171
+ */
172
+ this._eventHandler = null;
173
+
174
+ /**
175
+ * An event, available after first activation, which is triggered whenever the overview map is clicked.
176
+ * Is passed a {@link InteractionEvent} as its only argument
177
+ * @type {import("@vcmap/core").VcsEvent<import("@vcmap/core").InteractionEvent>|null}
178
+ * @private
179
+ */
180
+ this._mapClicked = null;
181
+
182
+ /**
183
+ * @type {Function}
184
+ */
185
+ this._mapPointerListener = null;
186
+
187
+ /**
188
+ * @type {Array<function():void>}
189
+ * @private
190
+ */
191
+ this._listeners = [];
192
+ /**
193
+ * @type {function():void}
194
+ * @private
195
+ */
196
+ this._mapActivatedListener = null;
197
+
198
+ /**
199
+ * @type {Array<function():void>}
200
+ * @private
201
+ */
202
+ this._layerCollectionListener = [
203
+ this._app.maps.layerCollection.added.addEventListener((layer) => {
204
+ if (layer.properties.showInOverviewMap) {
205
+ const clone = deserializeLayer(this._app, layer.toJSON());
206
+ clone.activate();
207
+ const idx = this._map.layerCollection.indexOf(clone);
208
+ if (idx < 0) {
209
+ this._map.layerCollection.add(clone);
210
+ } else {
211
+ this._map.layerCollection.remove(clone);
212
+ this._map.layerCollection.add(clone, idx);
213
+ }
214
+ }
215
+ }),
216
+ this._app.maps.layerCollection.removed.addEventListener((layer) => {
217
+ if (this._map.layerCollection.hasKey(layer.name)) {
218
+ const clone = this._map.layerCollection.getByKey(layer.name);
219
+ this._map.layerCollection.remove(clone);
220
+ }
221
+ }),
222
+ ];
223
+ }
224
+
225
+ /**
226
+ * @type {boolean}
227
+ * @readonly
228
+ */
229
+ get active() {
230
+ return this._active;
231
+ }
232
+
233
+ /**
234
+ * @type {import("@vcmap/core").OpenlayersMap|null}
235
+ * @readonly
236
+ */
237
+ get map() {
238
+ return this._map;
239
+ }
240
+
241
+ /**
242
+ * @type {EventHandler|null}
243
+ * @readonly
244
+ */
245
+ get eventHandler() {
246
+ return this._eventHandler;
247
+ }
248
+
249
+ /**
250
+ * @type {import("@vcmap/core").VcsEvent<import("@vcmap/core").InteractionEvent>|null}
251
+ * @readonly
252
+ */
253
+ get mapClicked() {
254
+ return this._mapClicked;
255
+ }
256
+
257
+ /**
258
+ * @private
259
+ */
260
+ _setupMapInteraction() {
261
+ this._eventHandler = new EventHandler();
262
+ const overviewMapClickedInteraction = new OverviewMapClickedInteraction();
263
+ this._mapClicked = overviewMapClickedInteraction.mapClicked;
264
+ this._eventHandler.addPersistentInteraction(overviewMapClickedInteraction);
265
+ this._mapPointerListener = this._map.pointerInteractionEvent.addEventListener((e) => {
266
+ this._eventHandler.handleMapEvent(e);
267
+ });
268
+ }
269
+
270
+ /**
271
+ * activates the overview map and initializes handlers for current active map
272
+ * @private
273
+ * @returns {Promise<void>}
274
+ */
275
+ async _activate() {
276
+ if (!this._mapClicked) {
277
+ this._setupMapInteraction();
278
+ }
279
+ await this._map.activate();
280
+ if (!this._active) {
281
+ this._mapActivatedListener = this._app.maps.mapActivated.addEventListener(() => {
282
+ this._clearListeners();
283
+ this._cachedViewPoint = null;
284
+ this._activate();
285
+ });
286
+ }
287
+ this._active = true;
288
+ const { activeMap } = this._app.maps;
289
+ if (activeMap instanceof CesiumMap) {
290
+ await this._initializeForCesium(activeMap);
291
+ } else if (activeMap instanceof OpenlayersMap) {
292
+ await this._initializeForOpenlayers(activeMap);
293
+ } else if (activeMap instanceof ObliqueMap) {
294
+ await this._initializeForOblique(activeMap);
295
+ }
296
+ }
297
+
298
+ /**
299
+ * opens window and sets target
300
+ * @returns {Promise<void>}
301
+ */
302
+ async activate() {
303
+ if (!this._app.windowManager.has('overview-map-container')) {
304
+ this._app.windowManager.add(getWindowComponentOptions(), vcsAppSymbol);
305
+ }
306
+ await this._activate();
307
+ this.map.setTarget('overview-map-container');
308
+ }
309
+
310
+ /**
311
+ * closes window and clears all listeners
312
+ */
313
+ deactivate() {
314
+ this._app.windowManager.remove('overview-map-container');
315
+ this._clearListeners();
316
+ if (this._mapActivatedListener) {
317
+ this._mapActivatedListener();
318
+ this._mapActivatedListener = null;
319
+ }
320
+ this._active = false;
321
+ }
322
+
323
+ /**
324
+ * @param {import("@vcmap/core").CesiumMap} cesiumMap
325
+ * @returns {Promise<void>}
326
+ * @private
327
+ */
328
+ async _initializeForCesium(cesiumMap) {
329
+ if (!this._cameraIconLayer) {
330
+ this._setupCameraIconLayer();
331
+ }
332
+ if (cesiumMap.initialized) {
333
+ const cesiumViewer = cesiumMap.getCesiumWidget();
334
+ const cesiumScene = cesiumViewer.scene;
335
+ const navRemover = this._addNavigationListener(cesiumMap);
336
+ const prRemover = cesiumScene.postRender.addEventListener(this._addCameraFeature, this);
337
+ const cleanupTasks = () => {
338
+ prRemover();
339
+ navRemover();
340
+ this._cameraIconLayer.deactivate();
341
+ };
342
+ this._listeners.push(cleanupTasks);
343
+ await this._cameraIconLayer.activate();
344
+ }
345
+ }
346
+
347
+ /**
348
+ * @param {import("@vcmap/core").OpenlayersMap} map
349
+ * @returns {Promise<void>}
350
+ * @private
351
+ */
352
+ async _initializeForOpenlayers(map) {
353
+ if (!this._cameraIconLayer) {
354
+ this._setupCameraIconLayer();
355
+ }
356
+ const { olMap } = map;
357
+ const navListener = this._addNavigationListener(map);
358
+ const prUnKey = olMap.on('postrender', this._addCameraFeature.bind(this));
359
+
360
+ const cleanupTasks = () => {
361
+ unByKey(prUnKey);
362
+ navListener();
363
+ this._cameraIconLayer.deactivate();
364
+ };
365
+ this._listeners.push(cleanupTasks);
366
+ await this._cameraIconLayer.activate();
367
+ }
368
+
369
+ /**
370
+ * @param {import("@vcmap/core").ObliqueMap} obliqueMap
371
+ * @returns {Promise<void>}
372
+ * @private
373
+ */
374
+ async _initializeForOblique(obliqueMap) {
375
+ if (!this._obliqueTileLayer) {
376
+ this._setupObliqueLayers();
377
+ }
378
+ const mapClickedListener = this._mapClicked.addEventListener(async (e) => {
379
+ if (e.feature) {
380
+ const id = e.feature.getId().toString();
381
+ if (this._obliqueTileLayer.getFeatureById(id)) {
382
+ const image = await obliqueMap.collection
383
+ .loadImageForCoordinate(e.positionOrPixel, this._obliqueViewDirection);
384
+ if (image) {
385
+ await obliqueMap.setImageByName(image.name);
386
+ }
387
+ } else {
388
+ await obliqueMap.setImageByName(id);
389
+ }
390
+ }
391
+ });
392
+
393
+ const listeners = [
394
+ mapClickedListener,
395
+ obliqueMap.imageChanged.addEventListener(this._obliqueImageChange.bind(this)),
396
+ obliqueMap.collectionChanged.addEventListener(this._obliqueCollectionChanged.bind(this)),
397
+ ];
398
+
399
+ const prUnKey = this._map.olMap.once('postrender', () => {
400
+ this._obliqueCollectionChanged(obliqueMap.collection);
401
+ this._obliqueImageChange(obliqueMap.currentImage);
402
+ });
403
+
404
+ const cleanupTasks = () => {
405
+ this._obliqueTileLayer.deactivate();
406
+ this._obliqueImageLayer.deactivate();
407
+ this._obliqueSelectedImageLayer.deactivate();
408
+ unByKey(prUnKey);
409
+ listeners.forEach((l) => { l(); });
410
+ };
411
+ this._listeners.push(cleanupTasks);
412
+ await this._obliqueTileLayer.activate();
413
+ await this._obliqueImageLayer.activate();
414
+ await this._obliqueSelectedImageLayer.activate();
415
+ }
416
+
417
+ /**
418
+ * @param {import("@vcmap/core").ObliqueCollection} collection
419
+ * @private
420
+ */
421
+ _obliqueCollectionChanged(collection) {
422
+ this._obliqueTileLayer.source = collection.tileFeatureSource;
423
+ this._obliqueTileLayer.forceRedraw();
424
+ this._obliqueImageLayer.source = collection.imageFeatureSource;
425
+ this._obliqueImageLayer.forceRedraw();
426
+ this._obliqueSelectedImageLayer.removeAllFeatures();
427
+ }
428
+
429
+ /**
430
+ * @param {import("@vcmap/core").ObliqueImage=} image
431
+ * @private
432
+ */
433
+ _obliqueImageChange(image) {
434
+ const { source } = this._obliqueImageLayer;
435
+ if (this._obliqueViewDirection !== image.viewDirection) {
436
+ this._obliqueViewDirection = image.viewDirection;
437
+ source.changed();
438
+ }
439
+ const activeFeature = source.getFeatureById(image.name);
440
+ if (activeFeature) {
441
+ this._obliqueSelectedImageLayer.removeAllFeatures();
442
+ this._obliqueSelectedImageLayer.addFeatures([activeFeature]);
443
+ const extent = new Extent({
444
+ coordinates: activeFeature.getGeometry().getExtent(),
445
+ projection: mercatorProjection.toJSON(),
446
+ });
447
+
448
+ const vp = ViewPoint.createViewPointFromExtent(extent);
449
+ vp.distance /= this._obliqueResolutionFactor;
450
+ this._map.gotoViewPoint(vp);
451
+ }
452
+ }
453
+
454
+ /**
455
+ * @private
456
+ */
457
+ _setupObliqueLayers() {
458
+ const obliqueTileStyle = new VectorStyleItem({});
459
+ obliqueTileStyle.style = (feature) => {
460
+ if (feature.get('state') === DataState.PENDING) {
461
+ return /** @type {ol/style/Style} */ (this.obliqueUnselectedStyle.style);
462
+ }
463
+ return emptyStyle;
464
+ };
465
+
466
+ this._obliqueTileLayer = new VectorLayer({
467
+ projection: mercatorProjection.toJSON(),
468
+ style: obliqueTileStyle,
469
+ zIndex: 1,
470
+ });
471
+
472
+ const obliqueImageStyle = new VectorStyleItem({});
473
+ obliqueImageStyle.style = (feature) => {
474
+ if (feature.get('viewDirection') === this._obliqueViewDirection) {
475
+ return this.obliqueUnselectedStyle.style;
476
+ }
477
+ return emptyStyle;
478
+ };
479
+
480
+ this._obliqueImageLayer = new VectorLayer({
481
+ projection: mercatorProjection.toJSON(),
482
+ style: obliqueImageStyle,
483
+ });
484
+ this._obliqueSelectedImageLayer = new VectorLayer({
485
+ projection: mercatorProjection.toJSON(),
486
+ style: this.obliqueSelectedStyle,
487
+ });
488
+ this._map.layerCollection.add(this._obliqueImageLayer);
489
+ this._map.layerCollection.add(this._obliqueSelectedImageLayer);
490
+ this._map.layerCollection.add(this._obliqueTileLayer);
491
+ }
492
+
493
+ /**
494
+ * @param {import("@vcmap/core").VcsMap} activeMap
495
+ * @returns {Function}
496
+ * @private
497
+ */
498
+ _addNavigationListener(activeMap) {
499
+ return this._mapClicked.addEventListener((e) => {
500
+ const vp = activeMap.getViewPointSync();
501
+ const height = vp.groundPosition[2] ? vp.groundPosition[2] : 0.0;
502
+ vp.groundPosition = Projection.mercatorToWgs84(e.positionOrPixel);
503
+ vp.groundPosition[2] = height;
504
+ vp.cameraPosition = null;
505
+ activeMap.gotoViewPoint(vp);
506
+ });
507
+ }
508
+
509
+ _setupCameraIconLayer() {
510
+ if (!this._cameraIconLayer) {
511
+ this._cameraIconLayer = new VectorLayer({
512
+ projection: mercatorProjection.toJSON(),
513
+ zIndex: 50,
514
+ });
515
+ this._map.layerCollection.add(this._cameraIconLayer);
516
+ }
517
+ }
518
+
519
+ /**
520
+ * Adds and maintains the view and camera feature
521
+ * @private
522
+ */
523
+ _addCameraFeature() {
524
+ const viewpoint = this._app.maps.activeMap.getViewPointSync();
525
+ if (!viewpoint || !viewpoint.isValid() || viewpoint.equals(this._cachedViewPoint)) {
526
+ return;
527
+ }
528
+ this._cachedViewPoint = viewpoint.clone();
529
+ const gp = viewpoint.groundPosition;
530
+ const position = viewpoint.cameraPosition || gp;
531
+ const { heading } = viewpoint;
532
+ let { distance } = viewpoint;
533
+ if (position[2] && !(distance && distance < position[2] * 4)) {
534
+ distance = position[2] * 4;
535
+ } else if (position[2] == null) {
536
+ position[2] = distance;
537
+ }
538
+
539
+ distance = distance > this.minimumHeight ? distance : this.minimumHeight;
540
+ if (heading == null || distance == null) {
541
+ return;
542
+ }
543
+ let cameraFeature = this._cameraIconLayer.getFeatureById('cameraFeature');
544
+ if (!cameraFeature) {
545
+ const cameraGeometry = new Point([position[0], position[1]]);
546
+ cameraFeature = new Feature({
547
+ geometry: cameraGeometry,
548
+ });
549
+ cameraFeature.setId('cameraFeature');
550
+ cameraFeature.setStyle(this.cameraIconStyle.style);
551
+ this._cameraIconLayer.addFeatures([cameraFeature]);
552
+ }
553
+ cameraFeature.getGeometry().setCoordinates(Projection.wgs84ToMercator(position));
554
+
555
+ const rotationDegrees = viewpoint.heading;
556
+ const rotationRadians = CesiumMath.toRadians(rotationDegrees);
557
+
558
+ this.cameraIconStyle.image.setRotation(rotationRadians);
559
+
560
+ viewpoint.heading = 0;
561
+ viewpoint.cameraPosition = position;
562
+ viewpoint.groundPosition = null;
563
+ viewpoint.distance = distance * 4;
564
+
565
+ this._map.gotoViewPoint(viewpoint);
566
+ }
567
+
568
+ /**
569
+ * @private
570
+ */
571
+ _clearListeners() {
572
+ this._listeners.forEach(cb => cb());
573
+ this._listeners.splice(0);
574
+ }
575
+
576
+ destroy() {
577
+ this._clearListeners();
578
+ this._layerCollectionListener.forEach(cb => cb());
579
+ if (this._mapPointerListener) {
580
+ this._mapPointerListener();
581
+ this._mapPointerListener = null;
582
+ }
583
+ if (this._mapActivatedListener) {
584
+ this._mapActivatedListener();
585
+ this._mapActivatedListener = null;
586
+ }
587
+ if (this._map) {
588
+ this._map.destroy();
589
+ }
590
+ if (this._obliqueTileLayer) {
591
+ this._obliqueTileLayer.source = new VectorSource({});
592
+ this._obliqueTileLayer.destroy();
593
+ }
594
+ if (this._obliqueImageLayer) {
595
+ this._obliqueImageLayer.source = new VectorSource({});
596
+ this._obliqueImageLayer.destroy();
597
+ }
598
+ if (this._obliqueSelectedImageLayer) {
599
+ this._obliqueSelectedImageLayer.source = new VectorSource({});
600
+ this._obliqueSelectedImageLayer.destroy();
601
+ }
602
+ if (this._cameraIconLayer) {
603
+ this._cameraIconLayer.destroy();
604
+ }
605
+ if (this._eventHandler) {
606
+ this._eventHandler.destroy();
607
+ }
608
+ this.cameraIconStyle.destroy();
609
+ this.obliqueUnselectedStyle.destroy();
610
+ this.obliqueSelectedStyle.destroy();
611
+ this._cachedViewPoint = null;
612
+ this._mapClicked = null;
613
+ }
614
+ }
615
+
616
+ export default OverviewMap;
@@ -0,0 +1,38 @@
1
+ import { VcsEvent, EventType, ModificationKeyType, AbstractInteraction } from '@vcmap/core';
2
+
3
+ /**
4
+ * @class
5
+ * @extends {import("@vcmap/core").AbstractInteraction}
6
+ */
7
+ class OverviewMapClickedInteraction extends AbstractInteraction {
8
+ constructor() {
9
+ super(EventType.CLICK, ModificationKeyType.ALL);
10
+
11
+ /**
12
+ * @type {import("@vcmap/core").VcsEvent<import("@vcmap/core").InteractionEvent>}
13
+ */
14
+ this.mapClicked = new VcsEvent();
15
+ this.setActive();
16
+ }
17
+
18
+ /**
19
+ * @inheritDoc
20
+ * @param {import("@vcmap/core").InteractionEvent} event
21
+ * @returns {Promise<import("@vcmap/core").InteractionEvent>}
22
+ */
23
+ async pipe(event) {
24
+ this.mapClicked.raiseEvent(event);
25
+ event.stopPropagation = true;
26
+ return event;
27
+ }
28
+
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ destroy() {
33
+ this.mapClicked.destroy();
34
+ super.destroy();
35
+ }
36
+ }
37
+
38
+ export default OverviewMapClickedInteraction;
@@ -47,7 +47,7 @@
47
47
  </style>
48
48
  <script>
49
49
  import { clamp } from 'ol/math.js';
50
- import { VcsTooltip } from '@vcsuite/ui-components';
50
+ import VcsTooltip from '../components/notification/VcsTooltip.vue';
51
51
 
52
52
  /**
53
53
  * A vertical slider from 0 to -90. pass value with v-model
@@ -1,5 +1,6 @@
1
1
  :root {
2
2
  --vcs-primary-logo: url('../assets/logo.svg');
3
+ --vcs-mobile-logo: url('../assets/logo-mobile.svg');
3
4
  }
4
5
 
5
6
  .company-logo {
@@ -8,6 +9,15 @@
8
9
  width: 151px;
9
10
  margin: 0 auto;
10
11
  }
12
+ .company-logo-mobile {
13
+ background-image: var(--vcs-mobile-logo);
14
+ height: 40px;
15
+ width: 70px;
16
+ position: absolute;
17
+ top: 1rem;
18
+ left: 1rem;
19
+ z-index: 1;
20
+ }
11
21
 
12
22
  // Dev-Only!
13
23
  .bg-dev.theme--light.v-application {
@@ -2,6 +2,9 @@
2
2
 
3
3
  @import './theming';
4
4
  @import './typography';
5
+ @import './variables';
6
+ @import './vcsFont';
7
+ @import './vcsGrid';
5
8
 
6
9
  html.vcs-ui {
7
10
  overflow-x: hidden !important;