@vcmap/ui 5.0.0-rc.28 → 5.0.0-rc.30
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/base.config.json +22 -0
- package/config/dev.config.json +4 -0
- package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +1 -1
- package/dist/assets/cesium/Workers/package.js +1 -1
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/assets/{cesium.973919.js → cesium.eaf7cc.js} +149552 -149560
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.7a2173.js → core.b16511.js} +4077 -3965
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-c115e3a1.js +1 -0
- package/dist/assets/{ol.f6e2e4.js → ol.4bbf0f.js} +11405 -11126
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.bd7a9a.css → ui.ab815e.css} +2 -2
- package/dist/assets/{ui.bd7a9a.js → ui.ab815e.js} +4232 -3512
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.95f6c3.js → vuetify.ea3fa8.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/index.js +7 -0
- package/lib/olLib.js +6 -0
- package/package.json +3 -3
- package/plugins/@vcmap/search-nominatim/SearchNominatimEditor.vue +90 -0
- package/plugins/@vcmap/search-nominatim/index.js +37 -0
- package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +37 -1
- package/plugins/@vcmap-show-case/form-inputs-example/index.js +3 -0
- package/plugins/@vcmap-show-case/form-inputs-example/validation.js +11 -0
- package/plugins/@vcmap-show-case/style-input-example/styleExample.vue +0 -1
- package/plugins/@vcmap-show-case/vector-properties-example/index.js +40 -0
- package/plugins/@vcmap-show-case/vector-properties-example/package.json +5 -0
- package/plugins/@vcmap-show-case/vector-properties-example/vectorPropertiesExample.vue +109 -0
- package/plugins/@vcmap-show-case/window-tester/WindowExample.vue +27 -9
- package/plugins/@vcmap-show-case/window-tester/index.js +13 -1
- package/plugins/@vcmap-show-case/window-tester/windowExampleToggleChild.vue +11 -10
- package/src/actions/actionHelper.js +7 -3
- package/src/application/VcsApp.vue +31 -0
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +282 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +12 -5
- package/src/components/icons/+all.js +3 -3
- package/src/components/lists/VcsTreeviewLeaf.vue +1 -1
- package/src/components/lists/VcsTreeviewSearchbar.vue +9 -4
- package/src/components/plugins/AbstractConfigEditor.vue +84 -0
- package/src/components/style/VcsImageSelector.vue +6 -5
- package/src/components/style/VcsTextSelector.vue +1 -1
- package/src/components/tables/VcsDataTable.vue +100 -13
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +737 -0
- package/src/components/vector-properties/composables.js +93 -0
- package/src/contentTree/contentTreeCollection.js +3 -0
- package/src/featureInfo/abstractFeatureInfoView.js +3 -1
- package/src/featureInfo/balloonFeatureInfoView.js +3 -2
- package/src/featureInfo/featureInfo.js +1 -0
- package/src/i18n/de.js +44 -9
- package/src/i18n/en.js +42 -7
- package/src/manager/collectionManager/collectionComponent.js +1 -1
- package/src/manager/window/WindowComponent.vue +4 -1
- package/src/manager/window/WindowComponentHeader.vue +25 -13
- package/src/manager/window/windowManager.js +6 -2
- package/src/navigation/overviewMap.js +1 -1
- package/src/pluginHelper.js +57 -17
- package/src/uiConfig.js +1 -0
- package/src/vcsUiApp.js +45 -34
- package/dist/assets/index-1b09f88d.js +0 -1
- /package/dist/assets/{vue.d4be99.js → vue.67e80f.js} +0 -0
- /package/dist/assets/{vuetify.95f6c3.css → vuetify.ea3fa8.css} +0 -0
- /package/src/components/icons/{PolygonIcon.vue → PointIcon.vue} +0 -0
package/dist/assets/ui.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "./ui.
|
1
|
+
export * from "./ui.ab815e.js";
|
package/dist/assets/vue.js
CHANGED
@@ -13,7 +13,7 @@ function loadCss(href) {
|
|
13
13
|
elem.onerror = reject;
|
14
14
|
document.head.appendChild(elem);
|
15
15
|
});
|
16
|
-
} await loadCss('./assets/vuetify.
|
16
|
+
} await loadCss('./assets/vuetify.ea3fa8.css');import v from "./vue.67e80f.js";
|
17
17
|
const Ne = v.extend().extend({
|
18
18
|
name: "themeable",
|
19
19
|
provide() {
|
package/dist/assets/vuetify.js
CHANGED
package/dist/index.html
CHANGED
@@ -29,7 +29,7 @@
|
|
29
29
|
/>
|
30
30
|
<link rel="icon" type="image/svg+xml" href="./assets/favicon.d5ec97.svg" />
|
31
31
|
|
32
|
-
<script type="module" crossorigin src="./assets/index-
|
32
|
+
<script type="module" crossorigin src="./assets/index-c115e3a1.js"></script>
|
33
33
|
</head>
|
34
34
|
<body style="height: 100vh">
|
35
35
|
<noscript>
|
package/index.js
CHANGED
@@ -139,6 +139,7 @@ export { default as VcsCompass } from './src/navigation/vcsCompass.vue';
|
|
139
139
|
export { default as VcsZoomButton } from './src/navigation/vcsZoomButton.vue';
|
140
140
|
|
141
141
|
export { createVueI18n, setupI18n } from './src/vuePlugins/i18n.js';
|
142
|
+
export { i18nPluginSymbol } from './src/i18n/i18nCollection.js';
|
142
143
|
export {
|
143
144
|
createVuetify,
|
144
145
|
vuetify,
|
@@ -161,6 +162,7 @@ export {
|
|
161
162
|
vcsAppSymbol,
|
162
163
|
pluginFactorySymbol,
|
163
164
|
pluginBaseUrlSymbol,
|
165
|
+
pluginModuleUrlSymbol,
|
164
166
|
getPluginAssetUrl,
|
165
167
|
isValidPackageName,
|
166
168
|
loadPlugin,
|
@@ -203,6 +205,7 @@ export { default as VcsFormSection } from './src/components/form-inputs-controls
|
|
203
205
|
export { default as VcsSelect } from './src/components/form-inputs-controls/VcsSelect.vue';
|
204
206
|
export { default as VcsSlider } from './src/components/form-inputs-controls/VcsSlider.vue';
|
205
207
|
export { default as VcsTextField } from './src/components/form-inputs-controls/VcsTextField.vue';
|
208
|
+
export { default as VcsChipArrayInput } from './src/components/form-inputs-controls/VcsChipArrayInput.vue';
|
206
209
|
export { default as VcsTextArea } from './src/components/form-inputs-controls/VcsTextArea.vue';
|
207
210
|
export { default as VcsWizard } from './src/components/form-inputs-controls/VcsWizard.vue';
|
208
211
|
export { default as VcsWizardStep } from './src/components/form-inputs-controls/VcsWizardStep.vue';
|
@@ -244,5 +247,9 @@ export {
|
|
244
247
|
VectorStyleMenus,
|
245
248
|
} from './src/components/style/VcsVectorStyleComponent.vue';
|
246
249
|
|
250
|
+
export { default as VcsVectorPropertiesComponent } from './src/components/vector-properties/VcsVectorPropertiesComponent.vue';
|
251
|
+
|
247
252
|
// export { default as VcsFileNamePopover } from './src/components/popovers/VcsFileNamePopover.vue';
|
248
253
|
// export { default as VcsTexturePopover } from './src/components/popovers/VcsTexturePopover.vue';
|
254
|
+
|
255
|
+
export { default as AbstractConfigEditor } from './src/components/plugins/AbstractConfigEditor.vue';
|
package/lib/olLib.js
CHANGED
@@ -50,6 +50,7 @@ export {default as ol$ViewHint} from 'ol/ViewHint';
|
|
50
50
|
export {default as ol$ViewProperty} from 'ol/ViewProperty';
|
51
51
|
export {binarySearch as ol$array$binarySearch} from 'ol/array';
|
52
52
|
export {ascending as ol$array$ascending} from 'ol/array';
|
53
|
+
export {descending as ol$array$descending} from 'ol/array';
|
53
54
|
export {linearFindNearest as ol$array$linearFindNearest} from 'ol/array';
|
54
55
|
export {reverseSubArray as ol$array$reverseSubArray} from 'ol/array';
|
55
56
|
export {extend as ol$array$extend} from 'ol/array';
|
@@ -124,6 +125,8 @@ export {preventDefault as ol$events$Event$preventDefault} from 'ol/events/Event'
|
|
124
125
|
export {default as ol$events$Event} from 'ol/events/Event';
|
125
126
|
export {default as ol$events$EventType} from 'ol/events/EventType';
|
126
127
|
export {default as ol$events$Key} from 'ol/events/Key';
|
128
|
+
export {SnapEventType as ol$events$SnapEvent$SnapEventType} from 'ol/events/SnapEvent';
|
129
|
+
export {SnapEvent as ol$events$SnapEvent$SnapEvent} from 'ol/events/SnapEvent';
|
127
130
|
export {default as ol$events$Target} from 'ol/events/Target';
|
128
131
|
export {all as ol$events$condition$all} from 'ol/events/condition';
|
129
132
|
export {altKeyOnly as ol$events$condition$altKeyOnly} from 'ol/events/condition';
|
@@ -139,6 +142,7 @@ export {singleClick as ol$events$condition$singleClick} from 'ol/events/conditio
|
|
139
142
|
export {doubleClick as ol$events$condition$doubleClick} from 'ol/events/condition';
|
140
143
|
export {noModifierKeys as ol$events$condition$noModifierKeys} from 'ol/events/condition';
|
141
144
|
export {platformModifierKeyOnly as ol$events$condition$platformModifierKeyOnly} from 'ol/events/condition';
|
145
|
+
export {platformModifierKey as ol$events$condition$platformModifierKey} from 'ol/events/condition';
|
142
146
|
export {shiftKeyOnly as ol$events$condition$shiftKeyOnly} from 'ol/events/condition';
|
143
147
|
export {targetNotEditable as ol$events$condition$targetNotEditable} from 'ol/events/condition';
|
144
148
|
export {mouseOnly as ol$events$condition$mouseOnly} from 'ol/events/condition';
|
@@ -507,6 +511,7 @@ export {register as ol$proj$proj4$register} from 'ol/proj/proj4';
|
|
507
511
|
export {setEPSGLookup as ol$proj$proj4$setEPSGLookup} from 'ol/proj/proj4';
|
508
512
|
export {getEPSGLookup as ol$proj$proj4$getEPSGLookup} from 'ol/proj/proj4';
|
509
513
|
export {fromEPSGCode as ol$proj$proj4$fromEPSGCode} from 'ol/proj/proj4';
|
514
|
+
export {epsgLookupMapTiler as ol$proj$proj4$epsgLookupMapTiler} from 'ol/proj/proj4';
|
510
515
|
export {clear as ol$proj$projections$clear} from 'ol/proj/projections';
|
511
516
|
export {get as ol$proj$projections$get} from 'ol/proj/projections';
|
512
517
|
export {add as ol$proj$projections$add} from 'ol/proj/projections';
|
@@ -751,6 +756,7 @@ export {expressionToGlsl as ol$style$expressions$expressionToGlsl} from 'ol/styl
|
|
751
756
|
export {uniformNameForVariable as ol$style$expressions$uniformNameForVariable} from 'ol/style/expressions';
|
752
757
|
export {PALETTE_TEXTURE_ARRAY as ol$style$expressions$PALETTE_TEXTURE_ARRAY} from 'ol/style/expressions';
|
753
758
|
export {toStyle as ol$style$flat$toStyle} from 'ol/style/flat';
|
759
|
+
export {createDefaultStyle as ol$style$flat$createDefaultStyle} from 'ol/style/flat';
|
754
760
|
export {SymbolType as ol$style$literal$SymbolType} from 'ol/style/literal';
|
755
761
|
export {createOrUpdate as ol$tilecoord$createOrUpdate} from 'ol/tilecoord';
|
756
762
|
export {getKeyZXY as ol$tilecoord$getKeyZXY} from 'ol/tilecoord';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vcmap/ui",
|
3
|
-
"version": "5.0.0-rc.
|
3
|
+
"version": "5.0.0-rc.30",
|
4
4
|
"author": "Virtual City Systems",
|
5
5
|
"license": "MIT",
|
6
6
|
"scripts": {
|
@@ -45,8 +45,8 @@
|
|
45
45
|
},
|
46
46
|
"peerDependencies": {
|
47
47
|
"@vcmap-cesium/engine": "~2.4.3",
|
48
|
-
"@vcmap/core": "^5.0.0-rc.
|
49
|
-
"ol": "~7.
|
48
|
+
"@vcmap/core": "^5.0.0-rc.37",
|
49
|
+
"ol": "~7.5.1",
|
50
50
|
"vue": "~2.7.3",
|
51
51
|
"vuetify": "~2.6.7"
|
52
52
|
},
|
@@ -0,0 +1,90 @@
|
|
1
|
+
<template>
|
2
|
+
<AbstractConfigEditor @submit="apply" v-bind="{ ...$attrs, ...$props }">
|
3
|
+
<v-container class="py-0 px-1">
|
4
|
+
<v-row
|
5
|
+
no-gutters
|
6
|
+
v-for="key in ['url', 'state', 'city', 'countryCode']"
|
7
|
+
:key="key"
|
8
|
+
>
|
9
|
+
<v-col>
|
10
|
+
<VcsLabel :html-for="key" dense>
|
11
|
+
{{ $t(`searchNominatim.${key}`) }}
|
12
|
+
</VcsLabel>
|
13
|
+
</v-col>
|
14
|
+
<v-col>
|
15
|
+
<VcsTextField
|
16
|
+
:id="key"
|
17
|
+
clearable
|
18
|
+
dense
|
19
|
+
v-model.trim="localConfig[key]"
|
20
|
+
/>
|
21
|
+
</v-col>
|
22
|
+
</v-row>
|
23
|
+
<!-- XXX extent -->
|
24
|
+
<v-row no-gutters>
|
25
|
+
<v-col>
|
26
|
+
<VcsLabel html-for="limit" dense>
|
27
|
+
{{ $t('searchNominatim.limit') }}
|
28
|
+
</VcsLabel>
|
29
|
+
</v-col>
|
30
|
+
<v-col>
|
31
|
+
<VcsTextField
|
32
|
+
id="limit"
|
33
|
+
clearable
|
34
|
+
dense
|
35
|
+
type="number"
|
36
|
+
v-model.number="localConfig.limit"
|
37
|
+
/>
|
38
|
+
</v-col>
|
39
|
+
</v-row>
|
40
|
+
</v-container>
|
41
|
+
</AbstractConfigEditor>
|
42
|
+
</template>
|
43
|
+
|
44
|
+
<script>
|
45
|
+
import { VContainer, VRow, VCol } from 'vuetify/lib';
|
46
|
+
import { VcsLabel, VcsTextField, AbstractConfigEditor } from '@vcmap/ui';
|
47
|
+
import { ref } from 'vue';
|
48
|
+
import Nominatim from './nominatim.js';
|
49
|
+
|
50
|
+
export default {
|
51
|
+
name: 'SearchNominatimEditor',
|
52
|
+
title: 'Search Nominatim Editor',
|
53
|
+
components: {
|
54
|
+
VContainer,
|
55
|
+
VRow,
|
56
|
+
VCol,
|
57
|
+
AbstractConfigEditor,
|
58
|
+
VcsLabel,
|
59
|
+
VcsTextField,
|
60
|
+
},
|
61
|
+
props: {
|
62
|
+
getConfig: {
|
63
|
+
type: Function,
|
64
|
+
required: true,
|
65
|
+
},
|
66
|
+
setConfig: {
|
67
|
+
type: Function,
|
68
|
+
required: true,
|
69
|
+
},
|
70
|
+
},
|
71
|
+
setup(props) {
|
72
|
+
const localConfig = ref({});
|
73
|
+
const defaultOptions = Nominatim.getDefaultOptions();
|
74
|
+
props.getConfig().then((config) => {
|
75
|
+
localConfig.value = Object.assign(defaultOptions, config);
|
76
|
+
});
|
77
|
+
|
78
|
+
const apply = async () => {
|
79
|
+
await props.setConfig(localConfig.value);
|
80
|
+
};
|
81
|
+
|
82
|
+
return {
|
83
|
+
localConfig,
|
84
|
+
apply,
|
85
|
+
};
|
86
|
+
},
|
87
|
+
};
|
88
|
+
</script>
|
89
|
+
|
90
|
+
<style scoped></style>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { version, name } from './package.json';
|
2
2
|
import Nominatim from './nominatim.js';
|
3
|
+
import SearchNominatimEditor from './SearchNominatimEditor.vue';
|
3
4
|
|
4
5
|
/**
|
5
6
|
* @param {NominatimSearchOptions} config - the configuration of this plugin instance, passed in from the app.
|
@@ -25,5 +26,41 @@ export default function searchNominatim(config) {
|
|
25
26
|
this._app = vcsUiApp;
|
26
27
|
vcsUiApp.search.add(this._instance, name);
|
27
28
|
},
|
29
|
+
/**
|
30
|
+
* @returns {NominatimSearchOptions}
|
31
|
+
*/
|
32
|
+
toJSON() {
|
33
|
+
return this._instance.toJSON();
|
34
|
+
},
|
35
|
+
getDefaultOptions() {
|
36
|
+
return Nominatim.getDefaultOptions();
|
37
|
+
},
|
38
|
+
getConfigEditors() {
|
39
|
+
return [{ component: SearchNominatimEditor }];
|
40
|
+
},
|
41
|
+
i18n: {
|
42
|
+
de: {
|
43
|
+
searchNominatim: {
|
44
|
+
name: 'Name',
|
45
|
+
url: 'URL zu Nominatim',
|
46
|
+
state: 'Bundesland',
|
47
|
+
city: 'Stadt',
|
48
|
+
countryCode: 'Ländercode',
|
49
|
+
limit: 'Maximale Anzahl Resultate',
|
50
|
+
bbox: 'Bounding Box',
|
51
|
+
},
|
52
|
+
},
|
53
|
+
en: {
|
54
|
+
searchNominatim: {
|
55
|
+
name: 'Name',
|
56
|
+
url: 'URL to Nominatim',
|
57
|
+
state: 'State',
|
58
|
+
city: 'City',
|
59
|
+
countryCode: 'Country Code',
|
60
|
+
limit: 'Maximum number of results',
|
61
|
+
bbox: 'Bounding Box',
|
62
|
+
},
|
63
|
+
},
|
64
|
+
},
|
28
65
|
};
|
29
66
|
}
|
@@ -54,6 +54,34 @@
|
|
54
54
|
/>
|
55
55
|
</v-col>
|
56
56
|
</v-row>
|
57
|
+
<v-row no-gutters>
|
58
|
+
<v-col class="w-max-half">
|
59
|
+
<VcsLabel html-for="arrayInput" :dense="dense">
|
60
|
+
Array Input
|
61
|
+
</VcsLabel>
|
62
|
+
</v-col>
|
63
|
+
</v-row>
|
64
|
+
<v-row no-gutters>
|
65
|
+
<v-col>
|
66
|
+
<VcsChipArrayInput
|
67
|
+
id="arrayInput"
|
68
|
+
type="number"
|
69
|
+
:dense="dense"
|
70
|
+
v-model="state.arrayInput"
|
71
|
+
:rules="[arrayTest]"
|
72
|
+
/>
|
73
|
+
</v-col>
|
74
|
+
</v-row>
|
75
|
+
<v-row no-gutters>
|
76
|
+
<v-col>
|
77
|
+
<VcsChipArrayInput
|
78
|
+
id="arrayInput"
|
79
|
+
:dense="dense"
|
80
|
+
v-model="state.arrayInputString"
|
81
|
+
column
|
82
|
+
/>
|
83
|
+
</v-col>
|
84
|
+
</v-row>
|
57
85
|
<v-row no-gutters>
|
58
86
|
<v-col>
|
59
87
|
<VcsTextField
|
@@ -394,6 +422,7 @@
|
|
394
422
|
VcsRadio,
|
395
423
|
VcsFormButton,
|
396
424
|
VcsTextField,
|
425
|
+
VcsChipArrayInput,
|
397
426
|
VcsFormattedNumber,
|
398
427
|
VcsFormSection,
|
399
428
|
VcsLabel,
|
@@ -404,7 +433,12 @@
|
|
404
433
|
} from '@vcmap/ui';
|
405
434
|
import { VCol, VContainer, VForm, VRow, VIcon } from 'vuetify/lib';
|
406
435
|
import packageJSON from './package.json';
|
407
|
-
import {
|
436
|
+
import {
|
437
|
+
isValidText,
|
438
|
+
conditionalTest,
|
439
|
+
arrayTest,
|
440
|
+
isValidEmail,
|
441
|
+
} from './validation.js';
|
408
442
|
|
409
443
|
export default {
|
410
444
|
name: 'FormInputsExample',
|
@@ -418,6 +452,7 @@
|
|
418
452
|
VcsFormSection,
|
419
453
|
VcsLabel,
|
420
454
|
VcsTextArea,
|
455
|
+
VcsChipArrayInput,
|
421
456
|
VForm,
|
422
457
|
VRow,
|
423
458
|
VCol,
|
@@ -455,6 +490,7 @@
|
|
455
490
|
isValid: ref(true),
|
456
491
|
isValidText,
|
457
492
|
conditionalTest,
|
493
|
+
arrayTest,
|
458
494
|
isValidEmail,
|
459
495
|
newUpdate,
|
460
496
|
resetState() {
|
@@ -26,6 +26,7 @@ function getLogger() {
|
|
26
26
|
* @typedef FormInputsExampleState
|
27
27
|
* @property {string} selected
|
28
28
|
* @property {Array<string>} selectedMultiple
|
29
|
+
* @property {Array<number>} arrayInput
|
29
30
|
* @property {string} conditionalInput
|
30
31
|
* @property {string} initialTextInput
|
31
32
|
* @property {number} numberInput
|
@@ -83,6 +84,8 @@ export default function formInputsExample(config) {
|
|
83
84
|
const pluginState = {
|
84
85
|
selected: pluginConfig.selectOptions.value[0],
|
85
86
|
selectedMultiple: [],
|
87
|
+
arrayInput: [1, 2, 3],
|
88
|
+
arrayInputString: ['a', 'b', 'c'],
|
86
89
|
conditionalInput: '',
|
87
90
|
initialTextInput: pluginConfig.initialTextInput.value,
|
88
91
|
numberInput: 100.156,
|
@@ -20,6 +20,17 @@ export function conditionalTest(value, condition) {
|
|
20
20
|
}
|
21
21
|
}
|
22
22
|
|
23
|
+
/**
|
24
|
+
* @param {number[]} value
|
25
|
+
* @returns {boolean|string}
|
26
|
+
*/
|
27
|
+
export function arrayTest(value) {
|
28
|
+
if (value > 10) {
|
29
|
+
return 'Input must be lower 10';
|
30
|
+
}
|
31
|
+
return true;
|
32
|
+
}
|
33
|
+
|
23
34
|
/**
|
24
35
|
* @param {string} value
|
25
36
|
* @returns {boolean|string}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { WindowSlot, createToggleAction, ButtonLocation } from '@vcmap/ui';
|
2
|
+
import packageJSON from './package.json';
|
3
|
+
import component from './vectorPropertiesExample.vue';
|
4
|
+
|
5
|
+
export default function createVectorPropertiesExamplePlugin() {
|
6
|
+
return {
|
7
|
+
get name() {
|
8
|
+
return packageJSON.name;
|
9
|
+
},
|
10
|
+
get version() {
|
11
|
+
return packageJSON.version;
|
12
|
+
},
|
13
|
+
get vcMapVersion() {
|
14
|
+
return packageJSON.vcMapVersion;
|
15
|
+
},
|
16
|
+
initialize(vcsApp) {
|
17
|
+
const { action, destroy } = createToggleAction(
|
18
|
+
{
|
19
|
+
name: 'Vector Properties Example',
|
20
|
+
},
|
21
|
+
{
|
22
|
+
id: 'vector-properties-example',
|
23
|
+
state: {
|
24
|
+
headerTitle: 'Vector Properties Example',
|
25
|
+
},
|
26
|
+
component,
|
27
|
+
slot: WindowSlot.DYNAMIC_LEFT,
|
28
|
+
},
|
29
|
+
vcsApp.windowManager,
|
30
|
+
packageJSON.name,
|
31
|
+
);
|
32
|
+
vcsApp.navbarManager.add(
|
33
|
+
{ id: 'vectorProperties', action },
|
34
|
+
packageJSON.name,
|
35
|
+
ButtonLocation.TOOL,
|
36
|
+
);
|
37
|
+
this.destroy = destroy;
|
38
|
+
},
|
39
|
+
};
|
40
|
+
}
|
@@ -0,0 +1,109 @@
|
|
1
|
+
<template>
|
2
|
+
<v-sheet>
|
3
|
+
<v-container>
|
4
|
+
<v-row>
|
5
|
+
<v-col>
|
6
|
+
<VcsList
|
7
|
+
:items="propertiesToSelectFrom"
|
8
|
+
:selectable="true"
|
9
|
+
v-model="propertiesToDisplay"
|
10
|
+
title="Select all"
|
11
|
+
/>
|
12
|
+
</v-col>
|
13
|
+
</v-row>
|
14
|
+
</v-container>
|
15
|
+
<VcsVectorPropertiesComponent
|
16
|
+
v-model="featureProperties"
|
17
|
+
:value-default="defaultOptions"
|
18
|
+
:show3-d-properties="is3D"
|
19
|
+
:properties="propertiesToDisplay.map((item) => item.name)"
|
20
|
+
/>
|
21
|
+
</v-sheet>
|
22
|
+
</template>
|
23
|
+
|
24
|
+
<script>
|
25
|
+
import { inject, onMounted, onUnmounted, ref, watch } from 'vue';
|
26
|
+
import { CesiumMap, VectorLayer, VectorProperties } from '@vcmap/core';
|
27
|
+
import { VcsVectorPropertiesComponent, VcsList } from '@vcmap/ui';
|
28
|
+
import { VSheet, VContainer, VRow, VCol } from 'vuetify/lib';
|
29
|
+
import { Feature } from 'ol';
|
30
|
+
import { Polygon } from 'ol/geom.js';
|
31
|
+
|
32
|
+
export const polygonCoords = [
|
33
|
+
[
|
34
|
+
[13.37302869387225, 52.515969833848686, 34.5146781549614],
|
35
|
+
[13.374380945328324, 52.51418689937603, 33.692166432214975],
|
36
|
+
[13.376569529360477, 52.516925129014055, 34.36842554294618],
|
37
|
+
[13.37302869387225, 52.515969833848686, 34.5146781549614],
|
38
|
+
],
|
39
|
+
];
|
40
|
+
|
41
|
+
export default {
|
42
|
+
name: 'VectorPropertiesExample',
|
43
|
+
components: {
|
44
|
+
VcsVectorPropertiesComponent,
|
45
|
+
VcsList,
|
46
|
+
VSheet,
|
47
|
+
VContainer,
|
48
|
+
VRow,
|
49
|
+
VCol,
|
50
|
+
},
|
51
|
+
setup() {
|
52
|
+
/** @type {import('@vcmap/core').VcsApp} */
|
53
|
+
const vcsApp = inject('vcsApp');
|
54
|
+
const is3D = ref(false);
|
55
|
+
|
56
|
+
function updateIs3D() {
|
57
|
+
is3D.value = vcsApp.maps.activeMap instanceof CesiumMap;
|
58
|
+
}
|
59
|
+
const mapActivatedListener =
|
60
|
+
vcsApp.maps.mapActivated.addEventListener(updateIs3D);
|
61
|
+
updateIs3D();
|
62
|
+
|
63
|
+
const feature = new Feature({
|
64
|
+
geometry: new Polygon(polygonCoords),
|
65
|
+
});
|
66
|
+
const layer = new VectorLayer({
|
67
|
+
name: 'vectorPropertiesExampleLayer',
|
68
|
+
projection: {
|
69
|
+
epsg: 'EPSG:4326',
|
70
|
+
},
|
71
|
+
});
|
72
|
+
|
73
|
+
const featureProperties = ref(
|
74
|
+
layer.vectorProperties.getValuesForFeatures([feature]),
|
75
|
+
);
|
76
|
+
watch(featureProperties, () => {
|
77
|
+
layer.vectorProperties.setValuesForFeatures(featureProperties.value, [
|
78
|
+
feature,
|
79
|
+
]);
|
80
|
+
});
|
81
|
+
|
82
|
+
const defaultOptions = VectorProperties.getDefaultOptions();
|
83
|
+
const propertiesToSelectFrom = Object.keys(defaultOptions).map((key) => ({
|
84
|
+
name: key,
|
85
|
+
title: key,
|
86
|
+
}));
|
87
|
+
|
88
|
+
onMounted(() => {
|
89
|
+
vcsApp.layers.add(layer);
|
90
|
+
layer.addFeatures([feature]);
|
91
|
+
layer.activate();
|
92
|
+
});
|
93
|
+
|
94
|
+
onUnmounted(() => {
|
95
|
+
layer.deactivate();
|
96
|
+
vcsApp.layers.remove(layer);
|
97
|
+
layer.destroy();
|
98
|
+
mapActivatedListener();
|
99
|
+
});
|
100
|
+
return {
|
101
|
+
featureProperties,
|
102
|
+
defaultOptions,
|
103
|
+
is3D,
|
104
|
+
propertiesToSelectFrom,
|
105
|
+
propertiesToDisplay: ref([...propertiesToSelectFrom]),
|
106
|
+
};
|
107
|
+
},
|
108
|
+
};
|
109
|
+
</script>
|
@@ -35,14 +35,16 @@
|
|
35
35
|
const exampleWindows = [
|
36
36
|
{
|
37
37
|
id: 'dynamicLeft',
|
38
|
-
|
38
|
+
state: {
|
39
|
+
headerTitle: ['windowTester.title', '-', 'Example dynamicLeft'],
|
40
|
+
},
|
39
41
|
component: WindowExampleToggleChild,
|
40
42
|
slot: WindowSlot.DYNAMIC_LEFT,
|
41
43
|
},
|
42
44
|
{
|
43
45
|
id: 'dynamicLeft2',
|
44
46
|
state: {
|
45
|
-
headerTitle: 'Example dynamicLeft2',
|
47
|
+
headerTitle: ['windowTester.title', '-', 'Example dynamicLeft2'],
|
46
48
|
},
|
47
49
|
component: WindowExampleToggleChild,
|
48
50
|
slot: WindowSlot.DYNAMIC_LEFT,
|
@@ -50,7 +52,11 @@
|
|
50
52
|
{
|
51
53
|
id: 'dynamicLeft2 large',
|
52
54
|
state: {
|
53
|
-
headerTitle:
|
55
|
+
headerTitle: [
|
56
|
+
'windowTester.title',
|
57
|
+
'-',
|
58
|
+
'Example dynamicLeft2 with 1000px width',
|
59
|
+
],
|
54
60
|
},
|
55
61
|
component: WindowExampleToggleChild,
|
56
62
|
slot: WindowSlot.DYNAMIC_LEFT,
|
@@ -61,7 +67,7 @@
|
|
61
67
|
{
|
62
68
|
id: 'dynamicRight',
|
63
69
|
state: {
|
64
|
-
headerTitle: 'Example dynamicRight',
|
70
|
+
headerTitle: ['windowTester.title', '-', 'Example dynamicRight'],
|
65
71
|
},
|
66
72
|
component: WindowExampleContent,
|
67
73
|
headerComponent: MyCustomHeader,
|
@@ -73,7 +79,7 @@
|
|
73
79
|
{
|
74
80
|
id: 'dynamicRight2',
|
75
81
|
state: {
|
76
|
-
headerTitle: 'Example dynamicRight2',
|
82
|
+
headerTitle: ['windowTester.title', '-', 'Example dynamicRight2'],
|
77
83
|
},
|
78
84
|
component: WindowExampleContent,
|
79
85
|
slot: WindowSlot.DYNAMIC_RIGHT,
|
@@ -81,7 +87,7 @@
|
|
81
87
|
{
|
82
88
|
id: 'static',
|
83
89
|
state: {
|
84
|
-
headerTitle: 'Example static',
|
90
|
+
headerTitle: ['windowTester.title', '-', 'Example static'],
|
85
91
|
styles: { 'background-color': 'red' },
|
86
92
|
},
|
87
93
|
component: WindowExampleToggleChild,
|
@@ -90,7 +96,11 @@
|
|
90
96
|
{
|
91
97
|
id: 'static2',
|
92
98
|
state: {
|
93
|
-
headerTitle:
|
99
|
+
headerTitle: [
|
100
|
+
'windowTester.title',
|
101
|
+
'-',
|
102
|
+
'Example static2 With TestClass',
|
103
|
+
],
|
94
104
|
classes: {
|
95
105
|
vcsTest: computed(() => {
|
96
106
|
return showTestClass.value;
|
@@ -103,7 +113,11 @@
|
|
103
113
|
{
|
104
114
|
id: 'position1',
|
105
115
|
state: {
|
106
|
-
headerTitle:
|
116
|
+
headerTitle: [
|
117
|
+
'windowTester.title',
|
118
|
+
'-',
|
119
|
+
'Example position1 relative',
|
120
|
+
],
|
107
121
|
},
|
108
122
|
component: WindowExampleToggleChild,
|
109
123
|
position: {
|
@@ -117,7 +131,11 @@
|
|
117
131
|
id: 'position2',
|
118
132
|
state: {
|
119
133
|
hideHeader: false,
|
120
|
-
headerTitle:
|
134
|
+
headerTitle: [
|
135
|
+
'windowTester.title',
|
136
|
+
'-',
|
137
|
+
'Example position2 absolute',
|
138
|
+
],
|
121
139
|
},
|
122
140
|
component: WindowExampleToggleChild,
|
123
141
|
position: {
|
@@ -25,7 +25,7 @@ export default async function windowTester() {
|
|
25
25
|
{
|
26
26
|
id: 'window-tester',
|
27
27
|
state: {
|
28
|
-
headerTitle: '
|
28
|
+
headerTitle: 'windowTester.title',
|
29
29
|
},
|
30
30
|
component: windowExample,
|
31
31
|
position: {
|
@@ -58,6 +58,18 @@ export default async function windowTester() {
|
|
58
58
|
);
|
59
59
|
this._destroyAction = [destroy, destroyToolboxData];
|
60
60
|
},
|
61
|
+
i18n: {
|
62
|
+
de: {
|
63
|
+
windowTester: {
|
64
|
+
title: 'Fenster Tester',
|
65
|
+
},
|
66
|
+
},
|
67
|
+
en: {
|
68
|
+
windowTester: {
|
69
|
+
title: 'Window Tester',
|
70
|
+
},
|
71
|
+
},
|
72
|
+
},
|
61
73
|
destroy() {
|
62
74
|
if (this._destroyActions) {
|
63
75
|
this._destroyActions.forEach((cb) => cb());
|