@vcmap/ui 6.2.2 → 6.3.0-rc.1
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/config/dev.config.json +1 -1
- package/config/geofence.config.json +19 -0
- package/config/pano.config.json +313 -7
- package/config/projects.config.json +2 -1
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-4cd2e30d.js → core-b7d98022.js} +10114 -9823
- package/dist/assets/core-workers/panoramaImageWorker.js +1 -1
- package/dist/assets/core.js +1 -1
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui-b13e28a1.css → ui-94adeedc.css} +1 -1
- package/dist/assets/{ui-b13e28a1.js → ui-94adeedc.js} +6958 -6802
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-a1930526.js → vuetify-2f71239e.js} +1 -1
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +1 -0
- package/package.json +2 -2
- package/plugins/@vcmap-show-case/extent-example/src/ExtentExample.vue +28 -0
- package/plugins/@vcmap-show-case/extent-example/src/index.js +3 -14
- package/plugins/@vcmap-show-case/panorama-inspector/src/PanoramaDebugTools.vue +28 -3
- package/plugins/@vcmap-show-case/panorama-inspector/src/api.js +8 -23
- package/plugins/@vcmap-show-case/panorama-inspector/src/index.js +1 -1
- package/plugins/package.json +2 -1
- package/src/application/VcsApp.vue +3 -0
- package/src/application/VcsPanoramaFooter.vue +52 -0
- package/src/application/VcsPanoramaFooter.vue.d.ts +2 -0
- package/src/application/VcsSettings.vue +4 -0
- package/src/components/extent/VcsExtent.vue +12 -1
- package/src/components/extent/VcsExtent.vue.d.ts +1 -0
- package/src/components/flight/VcsFlightAnchorsComponent.vue +2 -2
- package/src/components/lists/VcsList.vue +10 -18
- package/src/components/lists/VcsTreeNode.vue +8 -3
- package/src/components/lists/VcsTreeNode.vue.d.ts +4 -0
- package/src/components/lists/VcsTreeview.vue +2 -6
- package/src/components/lists/VcsTreeview.vue.d.ts +0 -1
- package/src/components/lists/dragHelper.d.ts +9 -2
- package/src/components/lists/dragHelper.js +47 -21
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +15 -5
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +123 -1
- package/src/contentTree/LayerSwap.vue +15 -4
- package/src/contentTree/LayerSwap.vue.d.ts +4 -4
- package/src/contentTree/contentTreeItem.js +1 -1
- package/src/contentTree/layerContentTreeItem.d.ts +4 -0
- package/src/contentTree/layerContentTreeItem.js +26 -20
- package/src/contentTree/layerGroupContentTreeItem.d.ts +1 -0
- package/src/contentTree/layerGroupContentTreeItem.js +32 -26
- package/src/contentTree/wmsGroupContentTreeItem.d.ts +23 -3
- package/src/contentTree/wmsGroupContentTreeItem.js +153 -83
- package/src/manager/collectionManager/CollectionComponentContent.vue +4 -4
- package/src/manager/collectionManager/CollectionComponentList.vue +2 -24
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +0 -8
- package/src/manager/collectionManager/CollectionManager.vue +14 -1
- package/src/state.d.ts +14 -0
- package/src/state.js +41 -0
- package/src/vcsUiApp.d.ts +9 -36
- package/src/vcsUiApp.js +45 -11
- /package/dist/assets/{cesium-b021f072.js → cesium-4fcc8a17.js} +0 -0
- /package/dist/assets/core-workers/{panoramaImageWorker.js-90c60e81.js → panoramaImageWorker.js-fc0f2458.js} +0 -0
- /package/dist/assets/{ol-c927b883.js → ol-8c487975.js} +0 -0
- /package/dist/assets/{vue-6a295c0b.js → vue-225a7b37.js} +0 -0
- /package/dist/assets/{vuetify-a1930526.css → vuetify-2f71239e.css} +0 -0
package/src/vcsUiApp.js
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
VcsEvent,
|
|
12
12
|
Viewpoint,
|
|
13
13
|
volatileModuleId,
|
|
14
|
+
WMSLayer,
|
|
14
15
|
} from '@vcmap/core';
|
|
15
16
|
import { getLogger as getLoggerByName } from '@vcsuite/logger';
|
|
16
17
|
import { deserializePlugin, serializePlugin } from './pluginHelper.js';
|
|
@@ -36,7 +37,12 @@ import FeatureInfo, {
|
|
|
36
37
|
featureInfoClassRegistry,
|
|
37
38
|
} from './featureInfo/featureInfo.js';
|
|
38
39
|
import UiConfig from './uiConfig.js';
|
|
39
|
-
import {
|
|
40
|
+
import {
|
|
41
|
+
createEmptyState,
|
|
42
|
+
getStateFromURL,
|
|
43
|
+
parseWMSStyle,
|
|
44
|
+
writeWMSStyleForLayer,
|
|
45
|
+
} from './state.js';
|
|
40
46
|
import { version } from '../package.json';
|
|
41
47
|
import Search from './search/search.js';
|
|
42
48
|
import Notifier from './notifier/notifier.js';
|
|
@@ -557,9 +563,17 @@ class VcsUiApp extends VcsApp {
|
|
|
557
563
|
*/
|
|
558
564
|
async getState(forUrl) {
|
|
559
565
|
const state = createEmptyState();
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
566
|
+
const nonDynamicModules = this.modules.filter(
|
|
567
|
+
({ _id }) => _id !== defaultDynamicModuleId,
|
|
568
|
+
);
|
|
569
|
+
|
|
570
|
+
if (nonDynamicModules.some((m) => !m.config._id)) {
|
|
571
|
+
getLogger().warning(
|
|
572
|
+
'Some modules you are creating are missing a stable _id property. This may lead to issues while restoring application state.',
|
|
573
|
+
);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
state.moduleIds = nonDynamicModules.map(({ _id }) => _id);
|
|
563
577
|
|
|
564
578
|
state.activeMap = this.maps.activeMap.name;
|
|
565
579
|
const viewpoint = await this.maps.activeMap.getViewpoint();
|
|
@@ -591,6 +605,12 @@ class VcsUiApp extends VcsApp {
|
|
|
591
605
|
l.style[moduleIdSymbol] !== volatileModuleId
|
|
592
606
|
) {
|
|
593
607
|
layerState.styleName = l.style.name;
|
|
608
|
+
} else if (l instanceof WMSLayer) {
|
|
609
|
+
const module = this.getModuleById(l[moduleIdSymbol]);
|
|
610
|
+
const styleName = writeWMSStyleForLayer(l, module?.config);
|
|
611
|
+
if (styleName) {
|
|
612
|
+
layerState.styleName = styleName;
|
|
613
|
+
}
|
|
594
614
|
}
|
|
595
615
|
return layerState;
|
|
596
616
|
});
|
|
@@ -642,6 +662,11 @@ class VcsUiApp extends VcsApp {
|
|
|
642
662
|
*/
|
|
643
663
|
async _parseModule(module) {
|
|
644
664
|
const { config } = module;
|
|
665
|
+
if (!config._id) {
|
|
666
|
+
getLogger().warning(
|
|
667
|
+
'A module is missing a stable _id property. This may lead to issues while restoring application state.',
|
|
668
|
+
);
|
|
669
|
+
}
|
|
645
670
|
if (Array.isArray(config.plugins)) {
|
|
646
671
|
await this._plugins.parseItems(config.plugins, module._id);
|
|
647
672
|
}
|
|
@@ -667,7 +692,7 @@ class VcsUiApp extends VcsApp {
|
|
|
667
692
|
if (layer) {
|
|
668
693
|
if (layerState.active) {
|
|
669
694
|
layer.activate().catch((e) => {
|
|
670
|
-
getLogger().
|
|
695
|
+
getLogger().warning(
|
|
671
696
|
'Failed to activate cached app state. layer failed: ',
|
|
672
697
|
layer.name,
|
|
673
698
|
);
|
|
@@ -677,12 +702,21 @@ class VcsUiApp extends VcsApp {
|
|
|
677
702
|
layer.deactivate();
|
|
678
703
|
}
|
|
679
704
|
|
|
680
|
-
if (
|
|
681
|
-
layerState.styleName &&
|
|
682
|
-
|
|
683
|
-
layer
|
|
684
|
-
|
|
685
|
-
|
|
705
|
+
if (layerState.styleName) {
|
|
706
|
+
if (this.styles.hasKey(layerState.styleName) && layer.setStyle) {
|
|
707
|
+
layer.setStyle(this.styles.getByKey(layerState.styleName));
|
|
708
|
+
} else if (layer instanceof WMSLayer) {
|
|
709
|
+
const { layers, styles } = parseWMSStyle(layerState.styleName);
|
|
710
|
+
if (styles) {
|
|
711
|
+
layer.parameters.STYLES = styles;
|
|
712
|
+
}
|
|
713
|
+
layer.setLayers(layers || layer.getLayers()).catch((err) => {
|
|
714
|
+
getLogger().warning(
|
|
715
|
+
`Failed to set WMS layers ${layers} on layer ${layer.name}`,
|
|
716
|
+
err,
|
|
717
|
+
);
|
|
718
|
+
});
|
|
719
|
+
}
|
|
686
720
|
}
|
|
687
721
|
}
|
|
688
722
|
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|