qwc2 2025.6.13 → 2025.7.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/actions/display.js +1 -1
- package/components/AttributeTableWidget.js +2 -2
- package/components/CoordinateDisplayer.js +1 -1
- package/components/Icon.js +1 -1
- package/components/PluginsContainer.js +2 -2
- package/{plugins → components}/ProcessNotifications.js +1 -5
- package/components/QtDesignerForm.js +1 -1
- package/components/ResizeableWindow.js +2 -2
- package/components/SearchBox.js +1 -1
- package/components/SideBar.js +3 -3
- package/components/TaskBar.js +1 -1
- package/components/map/OlMap.js +3 -3
- package/components/map3d/Compare3D.js +1 -1
- package/components/map3d/Draw3D.js +1 -1
- package/components/map3d/ExportObjects3D.js +4 -3
- package/components/map3d/HideObjects3D.js +3 -3
- package/components/map3d/Identify3D.js +3 -3
- package/components/map3d/ImportObjects3D.js +7 -0
- package/components/map3d/LayerTree3D.js +2 -3
- package/components/map3d/Map3D.js +21 -15
- package/components/map3d/Map3DLight.js +5 -4
- package/components/map3d/MapControls3D.js +5 -17
- package/components/map3d/MapExport3D.js +8 -4
- package/components/map3d/Measure3D.js +4 -5
- package/components/map3d/OverviewMap3D.js +2 -2
- package/components/map3d/SearchField3D.js +2 -2
- package/components/map3d/TopBar3D.js +1 -1
- package/components/map3d/View3DSwitcher.js +1 -1
- package/components/map3d/drawtool/CreateTool3D.js +2 -2
- package/components/map3d/drawtool/EditTool3D.js +6 -3
- package/components/map3d/drawtool/NumericInput3D.js +2 -1
- package/components/map3d/drawtool/TransformControls.js +259 -0
- package/components/map3d/{style/Draw3D.css → drawtool/style/NumericInput3D.css} +4 -0
- package/components/map3d/layers/WMSLayer3D.js +1 -1
- package/components/map3d/style/ImportObjects3D.css +21 -0
- package/components/map3d/style/LayerTree3D.css +27 -9
- package/components/map3d/style/Map3D.css +4 -8
- package/components/map3d/style/Map3DLight.css +1 -0
- package/components/map3d/style/MapControls3D.css +43 -11
- package/components/map3d/utils/FirstPersonControls3D.js +18 -0
- package/components/map3d/utils/MiscUtils3D.js +11 -0
- package/components/map3d/utils/OrbitControls3D.js +9 -0
- package/components/map3d/utils/Tiles3DStyle.js +8 -4
- package/components/style/AttributeTableWidget.css +2 -0
- package/components/style/Icon.css +1 -0
- package/components/style/PluginsContainer.css +9 -4
- package/{plugins → components}/style/ProcessNotifications.css +8 -9
- package/components/style/QtDesignerForm.css +1 -0
- package/components/style/SideBar.css +2 -0
- package/components/style/TaskBar.css +0 -1
- package/components/timeline/FixedTimeline.js +2 -2
- package/components/timeline/InfiniteTimeline.js +2 -2
- package/components/timeline/TimelineFeaturesSlider.js +2 -2
- package/components/timeline/style/FixedTimeline.css +1 -0
- package/components/timeline/style/InfiniteTimeline.css +1 -0
- package/components/timeline/style/TimelineFeaturesSlider.css +1 -0
- package/components/widgets/NumberInput.js +2 -2
- package/components/widgets/TextInput.js +1 -1
- package/components/widgets/style/TextInput.css +1 -0
- package/package.json +3 -2
- package/plugins/Authentication.js +2 -2
- package/plugins/BottomBar.js +4 -4
- package/plugins/LayerTree.js +1 -1
- package/plugins/Map.js +2 -2
- package/plugins/MapCompare.js +2 -2
- package/plugins/MapCopyright.js +2 -2
- package/plugins/MapExport.js +6 -5
- package/plugins/MapInfoTooltip.js +2 -2
- package/plugins/MapTip.js +3 -3
- package/plugins/{map/OverviewSupport.js → OverviewMap.js} +2 -2
- package/plugins/Redlining.js +1 -1
- package/plugins/Routing.js +4 -4
- package/plugins/TopBar.js +1 -1
- package/plugins/ValueTool.js +1 -1
- package/plugins/View3D.js +39 -14
- package/plugins/ZoomButtons.js +1 -1
- package/plugins/map/RedliningSupport.js +4 -9
- package/plugins/map/SnapSupport.js +1 -1
- package/plugins/style/Authentication.css +3 -3
- package/plugins/style/BottomBar.css +11 -0
- package/plugins/style/LayerTree.css +1 -0
- package/plugins/style/Map.css +6 -2
- package/plugins/style/MapCompare.css +6 -5
- package/plugins/style/MapCopyright.css +3 -0
- package/plugins/style/MapExport.css +1 -0
- package/plugins/{map/style/OverviewSupport.css → style/OverviewMap.css} +2 -6
- package/plugins/style/Print.css +1 -0
- package/plugins/style/View3D.css +22 -0
- package/reducers/windows.js +1 -1
- package/scripts/themesConfig.js +1 -1
- package/scripts/themesConfig.py +1 -1
- package/static/translations/bg-BG.json +12 -2
- package/static/translations/ca-ES.json +12 -2
- package/static/translations/cs-CZ.json +12 -2
- package/static/translations/de-CH.json +16 -6
- package/static/translations/de-DE.json +16 -6
- package/static/translations/en-US.json +12 -2
- package/static/translations/es-ES.json +12 -2
- package/static/translations/fi-FI.json +12 -2
- package/static/translations/fr-FR.json +12 -2
- package/static/translations/hu-HU.json +12 -2
- package/static/translations/it-IT.json +16 -6
- package/static/translations/ja-JP.json +12 -2
- package/static/translations/nl-NL.json +12 -2
- package/static/translations/no-NO.json +12 -2
- package/static/translations/pl-PL.json +12 -2
- package/static/translations/pt-BR.json +12 -2
- package/static/translations/pt-PT.json +12 -2
- package/static/translations/ro-RO.json +12 -2
- package/static/translations/ru-RU.json +12 -2
- package/static/translations/sv-SE.json +12 -2
- package/static/translations/tr-TR.json +12 -2
- package/static/translations/tsconfig.json +8 -2
- package/utils/IdentifyUtils.js +1 -1
- package/utils/MapUtils.js +1 -1
- package/utils/PermaLinkUtils.js +1 -1
- package/plugins/map/ScaleBarSupport.js +0 -10
- package/plugins/map/style/ScaleBarSupport.css +0 -18
|
@@ -147,9 +147,11 @@
|
|
|
147
147
|
"rotate": "",
|
|
148
148
|
"rotation": "",
|
|
149
149
|
"scale": "",
|
|
150
|
+
"sizeunavailable": "",
|
|
150
151
|
"sphere": "",
|
|
151
152
|
"subtract": "",
|
|
152
153
|
"thescale": "",
|
|
154
|
+
"thesize": "",
|
|
153
155
|
"translate": "",
|
|
154
156
|
"undoBool": "",
|
|
155
157
|
"union": "",
|
|
@@ -251,6 +253,10 @@
|
|
|
251
253
|
"confirmclose": "",
|
|
252
254
|
"title": ""
|
|
253
255
|
},
|
|
256
|
+
"import3d": {
|
|
257
|
+
"importing": "",
|
|
258
|
+
"noprocessesserver": ""
|
|
259
|
+
},
|
|
254
260
|
"importlayer": {
|
|
255
261
|
"addfailed": "",
|
|
256
262
|
"addlayer": "Dodaj warstwę",
|
|
@@ -341,6 +347,7 @@
|
|
|
341
347
|
"mapexport": {
|
|
342
348
|
"configuration": "",
|
|
343
349
|
"format": "Format:",
|
|
350
|
+
"projection": "",
|
|
344
351
|
"resolution": "Rozdzielczość:",
|
|
345
352
|
"scale": "",
|
|
346
353
|
"size": "",
|
|
@@ -373,13 +380,12 @@
|
|
|
373
380
|
"windowtitle": ""
|
|
374
381
|
},
|
|
375
382
|
"maplight3d": {
|
|
376
|
-
"ambientLightIntensity": "",
|
|
377
383
|
"animationstep": "",
|
|
378
384
|
"date": "",
|
|
379
385
|
"dayspersec": "",
|
|
380
|
-
"directionalLightIntensity": "",
|
|
381
386
|
"helpersVisible": "",
|
|
382
387
|
"minspersec": "",
|
|
388
|
+
"moonLightIntensity": "",
|
|
383
389
|
"normalBias": "",
|
|
384
390
|
"shadowBias": "",
|
|
385
391
|
"shadowMapSize": "",
|
|
@@ -389,6 +395,7 @@
|
|
|
389
395
|
"shadowintensity": "",
|
|
390
396
|
"shadows": "",
|
|
391
397
|
"showadvanced": "",
|
|
398
|
+
"sunLightIntensity": "",
|
|
392
399
|
"time": "",
|
|
393
400
|
"zFactor": ""
|
|
394
401
|
},
|
|
@@ -711,6 +718,9 @@
|
|
|
711
718
|
"none": "",
|
|
712
719
|
"prompt": ""
|
|
713
720
|
},
|
|
721
|
+
"view3d": {
|
|
722
|
+
"storingstate": ""
|
|
723
|
+
},
|
|
714
724
|
"window": {
|
|
715
725
|
"close": "",
|
|
716
726
|
"detach": "",
|
|
@@ -147,9 +147,11 @@
|
|
|
147
147
|
"rotate": "",
|
|
148
148
|
"rotation": "",
|
|
149
149
|
"scale": "",
|
|
150
|
+
"sizeunavailable": "",
|
|
150
151
|
"sphere": "",
|
|
151
152
|
"subtract": "",
|
|
152
153
|
"thescale": "",
|
|
154
|
+
"thesize": "",
|
|
153
155
|
"translate": "",
|
|
154
156
|
"undoBool": "",
|
|
155
157
|
"union": "",
|
|
@@ -251,6 +253,10 @@
|
|
|
251
253
|
"confirmclose": "Confirmar fechamento",
|
|
252
254
|
"title": "Título"
|
|
253
255
|
},
|
|
256
|
+
"import3d": {
|
|
257
|
+
"importing": "",
|
|
258
|
+
"noprocessesserver": ""
|
|
259
|
+
},
|
|
254
260
|
"importlayer": {
|
|
255
261
|
"addfailed": "Falha ao adicionar",
|
|
256
262
|
"addlayer": "Adicionar camada",
|
|
@@ -341,6 +347,7 @@
|
|
|
341
347
|
"mapexport": {
|
|
342
348
|
"configuration": "Configuração",
|
|
343
349
|
"format": "Formato:",
|
|
350
|
+
"projection": "",
|
|
344
351
|
"resolution": "Resolução:",
|
|
345
352
|
"scale": "Escala",
|
|
346
353
|
"size": "Tamanho",
|
|
@@ -373,13 +380,12 @@
|
|
|
373
380
|
"windowtitle": "Titulo da janela"
|
|
374
381
|
},
|
|
375
382
|
"maplight3d": {
|
|
376
|
-
"ambientLightIntensity": "",
|
|
377
383
|
"animationstep": "",
|
|
378
384
|
"date": "",
|
|
379
385
|
"dayspersec": "",
|
|
380
|
-
"directionalLightIntensity": "",
|
|
381
386
|
"helpersVisible": "",
|
|
382
387
|
"minspersec": "",
|
|
388
|
+
"moonLightIntensity": "",
|
|
383
389
|
"normalBias": "",
|
|
384
390
|
"shadowBias": "",
|
|
385
391
|
"shadowMapSize": "",
|
|
@@ -389,6 +395,7 @@
|
|
|
389
395
|
"shadowintensity": "",
|
|
390
396
|
"shadows": "",
|
|
391
397
|
"showadvanced": "",
|
|
398
|
+
"sunLightIntensity": "",
|
|
392
399
|
"time": "",
|
|
393
400
|
"zFactor": ""
|
|
394
401
|
},
|
|
@@ -711,6 +718,9 @@
|
|
|
711
718
|
"none": "",
|
|
712
719
|
"prompt": "Insira o nome da camada"
|
|
713
720
|
},
|
|
721
|
+
"view3d": {
|
|
722
|
+
"storingstate": ""
|
|
723
|
+
},
|
|
714
724
|
"window": {
|
|
715
725
|
"close": "Fechar",
|
|
716
726
|
"detach": "",
|
|
@@ -147,9 +147,11 @@
|
|
|
147
147
|
"rotate": "",
|
|
148
148
|
"rotation": "",
|
|
149
149
|
"scale": "",
|
|
150
|
+
"sizeunavailable": "",
|
|
150
151
|
"sphere": "",
|
|
151
152
|
"subtract": "",
|
|
152
153
|
"thescale": "",
|
|
154
|
+
"thesize": "",
|
|
153
155
|
"translate": "",
|
|
154
156
|
"undoBool": "",
|
|
155
157
|
"union": "",
|
|
@@ -251,6 +253,10 @@
|
|
|
251
253
|
"confirmclose": "Confirmar Fechar",
|
|
252
254
|
"title": "Editor de Imagens"
|
|
253
255
|
},
|
|
256
|
+
"import3d": {
|
|
257
|
+
"importing": "",
|
|
258
|
+
"noprocessesserver": ""
|
|
259
|
+
},
|
|
254
260
|
"importlayer": {
|
|
255
261
|
"addfailed": "Falha ao Adicionar",
|
|
256
262
|
"addlayer": "Adicionar Camada",
|
|
@@ -341,6 +347,7 @@
|
|
|
341
347
|
"mapexport": {
|
|
342
348
|
"configuration": "Configuração",
|
|
343
349
|
"format": "Formato:",
|
|
350
|
+
"projection": "",
|
|
344
351
|
"resolution": "Resolução:",
|
|
345
352
|
"scale": "Escala:",
|
|
346
353
|
"size": "Tamanho:",
|
|
@@ -373,13 +380,12 @@
|
|
|
373
380
|
"windowtitle": "Legenda do Mapa"
|
|
374
381
|
},
|
|
375
382
|
"maplight3d": {
|
|
376
|
-
"ambientLightIntensity": "",
|
|
377
383
|
"animationstep": "",
|
|
378
384
|
"date": "",
|
|
379
385
|
"dayspersec": "",
|
|
380
|
-
"directionalLightIntensity": "",
|
|
381
386
|
"helpersVisible": "",
|
|
382
387
|
"minspersec": "",
|
|
388
|
+
"moonLightIntensity": "",
|
|
383
389
|
"normalBias": "",
|
|
384
390
|
"shadowBias": "",
|
|
385
391
|
"shadowMapSize": "",
|
|
@@ -389,6 +395,7 @@
|
|
|
389
395
|
"shadowintensity": "",
|
|
390
396
|
"shadows": "",
|
|
391
397
|
"showadvanced": "",
|
|
398
|
+
"sunLightIntensity": "",
|
|
392
399
|
"time": "",
|
|
393
400
|
"zFactor": ""
|
|
394
401
|
},
|
|
@@ -711,6 +718,9 @@
|
|
|
711
718
|
"none": "Nenhum",
|
|
712
719
|
"prompt": "Insira o Nome da Camada"
|
|
713
720
|
},
|
|
721
|
+
"view3d": {
|
|
722
|
+
"storingstate": ""
|
|
723
|
+
},
|
|
714
724
|
"window": {
|
|
715
725
|
"close": "Fechar",
|
|
716
726
|
"detach": "",
|
|
@@ -147,9 +147,11 @@
|
|
|
147
147
|
"rotate": "",
|
|
148
148
|
"rotation": "",
|
|
149
149
|
"scale": "",
|
|
150
|
+
"sizeunavailable": "",
|
|
150
151
|
"sphere": "",
|
|
151
152
|
"subtract": "",
|
|
152
153
|
"thescale": "",
|
|
154
|
+
"thesize": "",
|
|
153
155
|
"translate": "",
|
|
154
156
|
"undoBool": "",
|
|
155
157
|
"union": "",
|
|
@@ -251,6 +253,10 @@
|
|
|
251
253
|
"confirmclose": "Închideți fără să salvați modificările?",
|
|
252
254
|
"title": "Editor de imagine"
|
|
253
255
|
},
|
|
256
|
+
"import3d": {
|
|
257
|
+
"importing": "",
|
|
258
|
+
"noprocessesserver": ""
|
|
259
|
+
},
|
|
254
260
|
"importlayer": {
|
|
255
261
|
"addfailed": "Adăugarea stratului a eșuat",
|
|
256
262
|
"addlayer": "Adaugă strat",
|
|
@@ -341,6 +347,7 @@
|
|
|
341
347
|
"mapexport": {
|
|
342
348
|
"configuration": "",
|
|
343
349
|
"format": "",
|
|
350
|
+
"projection": "",
|
|
344
351
|
"resolution": "",
|
|
345
352
|
"scale": "",
|
|
346
353
|
"size": "",
|
|
@@ -373,13 +380,12 @@
|
|
|
373
380
|
"windowtitle": "Legenda"
|
|
374
381
|
},
|
|
375
382
|
"maplight3d": {
|
|
376
|
-
"ambientLightIntensity": "",
|
|
377
383
|
"animationstep": "",
|
|
378
384
|
"date": "",
|
|
379
385
|
"dayspersec": "",
|
|
380
|
-
"directionalLightIntensity": "",
|
|
381
386
|
"helpersVisible": "",
|
|
382
387
|
"minspersec": "",
|
|
388
|
+
"moonLightIntensity": "",
|
|
383
389
|
"normalBias": "",
|
|
384
390
|
"shadowBias": "",
|
|
385
391
|
"shadowMapSize": "",
|
|
@@ -389,6 +395,7 @@
|
|
|
389
395
|
"shadowintensity": "",
|
|
390
396
|
"shadows": "",
|
|
391
397
|
"showadvanced": "",
|
|
398
|
+
"sunLightIntensity": "",
|
|
392
399
|
"time": "",
|
|
393
400
|
"zFactor": ""
|
|
394
401
|
},
|
|
@@ -711,6 +718,9 @@
|
|
|
711
718
|
"none": "Niciunul",
|
|
712
719
|
"prompt": "Introdu numele stratului"
|
|
713
720
|
},
|
|
721
|
+
"view3d": {
|
|
722
|
+
"storingstate": ""
|
|
723
|
+
},
|
|
714
724
|
"window": {
|
|
715
725
|
"close": "Închide",
|
|
716
726
|
"detach": "",
|
|
@@ -147,9 +147,11 @@
|
|
|
147
147
|
"rotate": "",
|
|
148
148
|
"rotation": "",
|
|
149
149
|
"scale": "",
|
|
150
|
+
"sizeunavailable": "",
|
|
150
151
|
"sphere": "",
|
|
151
152
|
"subtract": "",
|
|
152
153
|
"thescale": "",
|
|
154
|
+
"thesize": "",
|
|
153
155
|
"translate": "",
|
|
154
156
|
"undoBool": "",
|
|
155
157
|
"union": "",
|
|
@@ -251,6 +253,10 @@
|
|
|
251
253
|
"confirmclose": "",
|
|
252
254
|
"title": ""
|
|
253
255
|
},
|
|
256
|
+
"import3d": {
|
|
257
|
+
"importing": "",
|
|
258
|
+
"noprocessesserver": ""
|
|
259
|
+
},
|
|
254
260
|
"importlayer": {
|
|
255
261
|
"addfailed": "",
|
|
256
262
|
"addlayer": "Добавить слой",
|
|
@@ -341,6 +347,7 @@
|
|
|
341
347
|
"mapexport": {
|
|
342
348
|
"configuration": "",
|
|
343
349
|
"format": "Формат бумаги:",
|
|
350
|
+
"projection": "",
|
|
344
351
|
"resolution": "Разрешение:",
|
|
345
352
|
"scale": "",
|
|
346
353
|
"size": "",
|
|
@@ -373,13 +380,12 @@
|
|
|
373
380
|
"windowtitle": ""
|
|
374
381
|
},
|
|
375
382
|
"maplight3d": {
|
|
376
|
-
"ambientLightIntensity": "",
|
|
377
383
|
"animationstep": "",
|
|
378
384
|
"date": "",
|
|
379
385
|
"dayspersec": "",
|
|
380
|
-
"directionalLightIntensity": "",
|
|
381
386
|
"helpersVisible": "",
|
|
382
387
|
"minspersec": "",
|
|
388
|
+
"moonLightIntensity": "",
|
|
383
389
|
"normalBias": "",
|
|
384
390
|
"shadowBias": "",
|
|
385
391
|
"shadowMapSize": "",
|
|
@@ -389,6 +395,7 @@
|
|
|
389
395
|
"shadowintensity": "",
|
|
390
396
|
"shadows": "",
|
|
391
397
|
"showadvanced": "",
|
|
398
|
+
"sunLightIntensity": "",
|
|
392
399
|
"time": "",
|
|
393
400
|
"zFactor": ""
|
|
394
401
|
},
|
|
@@ -711,6 +718,9 @@
|
|
|
711
718
|
"none": "",
|
|
712
719
|
"prompt": ""
|
|
713
720
|
},
|
|
721
|
+
"view3d": {
|
|
722
|
+
"storingstate": ""
|
|
723
|
+
},
|
|
714
724
|
"window": {
|
|
715
725
|
"close": "",
|
|
716
726
|
"detach": "",
|
|
@@ -147,9 +147,11 @@
|
|
|
147
147
|
"rotate": "",
|
|
148
148
|
"rotation": "",
|
|
149
149
|
"scale": "",
|
|
150
|
+
"sizeunavailable": "",
|
|
150
151
|
"sphere": "",
|
|
151
152
|
"subtract": "",
|
|
152
153
|
"thescale": "",
|
|
154
|
+
"thesize": "",
|
|
153
155
|
"translate": "",
|
|
154
156
|
"undoBool": "",
|
|
155
157
|
"union": "",
|
|
@@ -251,6 +253,10 @@
|
|
|
251
253
|
"confirmclose": "",
|
|
252
254
|
"title": ""
|
|
253
255
|
},
|
|
256
|
+
"import3d": {
|
|
257
|
+
"importing": "",
|
|
258
|
+
"noprocessesserver": ""
|
|
259
|
+
},
|
|
254
260
|
"importlayer": {
|
|
255
261
|
"addfailed": "",
|
|
256
262
|
"addlayer": "Lägg till lager",
|
|
@@ -341,6 +347,7 @@
|
|
|
341
347
|
"mapexport": {
|
|
342
348
|
"configuration": "",
|
|
343
349
|
"format": "Format:",
|
|
350
|
+
"projection": "",
|
|
344
351
|
"resolution": "Upplösning:",
|
|
345
352
|
"scale": "",
|
|
346
353
|
"size": "",
|
|
@@ -373,13 +380,12 @@
|
|
|
373
380
|
"windowtitle": ""
|
|
374
381
|
},
|
|
375
382
|
"maplight3d": {
|
|
376
|
-
"ambientLightIntensity": "",
|
|
377
383
|
"animationstep": "",
|
|
378
384
|
"date": "",
|
|
379
385
|
"dayspersec": "",
|
|
380
|
-
"directionalLightIntensity": "",
|
|
381
386
|
"helpersVisible": "",
|
|
382
387
|
"minspersec": "",
|
|
388
|
+
"moonLightIntensity": "",
|
|
383
389
|
"normalBias": "",
|
|
384
390
|
"shadowBias": "",
|
|
385
391
|
"shadowMapSize": "",
|
|
@@ -389,6 +395,7 @@
|
|
|
389
395
|
"shadowintensity": "",
|
|
390
396
|
"shadows": "",
|
|
391
397
|
"showadvanced": "",
|
|
398
|
+
"sunLightIntensity": "",
|
|
392
399
|
"time": "",
|
|
393
400
|
"zFactor": ""
|
|
394
401
|
},
|
|
@@ -711,6 +718,9 @@
|
|
|
711
718
|
"none": "",
|
|
712
719
|
"prompt": ""
|
|
713
720
|
},
|
|
721
|
+
"view3d": {
|
|
722
|
+
"storingstate": ""
|
|
723
|
+
},
|
|
714
724
|
"window": {
|
|
715
725
|
"close": "",
|
|
716
726
|
"detach": "",
|
|
@@ -147,9 +147,11 @@
|
|
|
147
147
|
"rotate": "Döndür",
|
|
148
148
|
"rotation": "Dönüklük",
|
|
149
149
|
"scale": "Ölçek",
|
|
150
|
+
"sizeunavailable": "",
|
|
150
151
|
"sphere": "Küre",
|
|
151
152
|
"subtract": "",
|
|
152
153
|
"thescale": "Ölçek",
|
|
154
|
+
"thesize": "",
|
|
153
155
|
"translate": "Çevir",
|
|
154
156
|
"undoBool": "",
|
|
155
157
|
"union": "",
|
|
@@ -251,6 +253,10 @@
|
|
|
251
253
|
"confirmclose": "Kaydetmeden kapat",
|
|
252
254
|
"title": "Resim editörü"
|
|
253
255
|
},
|
|
256
|
+
"import3d": {
|
|
257
|
+
"importing": "",
|
|
258
|
+
"noprocessesserver": ""
|
|
259
|
+
},
|
|
254
260
|
"importlayer": {
|
|
255
261
|
"addfailed": "Katman ekleme başarısız",
|
|
256
262
|
"addlayer": "Katman ekle",
|
|
@@ -341,6 +347,7 @@
|
|
|
341
347
|
"mapexport": {
|
|
342
348
|
"configuration": "Yapılandırma",
|
|
343
349
|
"format": "Format:",
|
|
350
|
+
"projection": "",
|
|
344
351
|
"resolution": "Çözünürlük:",
|
|
345
352
|
"scale": "Ölçek",
|
|
346
353
|
"size": "Boyut",
|
|
@@ -373,13 +380,12 @@
|
|
|
373
380
|
"windowtitle": "Lejant"
|
|
374
381
|
},
|
|
375
382
|
"maplight3d": {
|
|
376
|
-
"ambientLightIntensity": "",
|
|
377
383
|
"animationstep": "",
|
|
378
384
|
"date": "",
|
|
379
385
|
"dayspersec": "",
|
|
380
|
-
"directionalLightIntensity": "",
|
|
381
386
|
"helpersVisible": "",
|
|
382
387
|
"minspersec": "",
|
|
388
|
+
"moonLightIntensity": "",
|
|
383
389
|
"normalBias": "",
|
|
384
390
|
"shadowBias": "",
|
|
385
391
|
"shadowMapSize": "",
|
|
@@ -389,6 +395,7 @@
|
|
|
389
395
|
"shadowintensity": "",
|
|
390
396
|
"shadows": "",
|
|
391
397
|
"showadvanced": "",
|
|
398
|
+
"sunLightIntensity": "",
|
|
392
399
|
"time": "",
|
|
393
400
|
"zFactor": ""
|
|
394
401
|
},
|
|
@@ -711,6 +718,9 @@
|
|
|
711
718
|
"none": "Yok",
|
|
712
719
|
"prompt": "Katman adı giriniz"
|
|
713
720
|
},
|
|
721
|
+
"view3d": {
|
|
722
|
+
"storingstate": ""
|
|
723
|
+
},
|
|
714
724
|
"window": {
|
|
715
725
|
"close": "Kapat",
|
|
716
726
|
"detach": "Çöz",
|
|
@@ -154,9 +154,11 @@
|
|
|
154
154
|
"draw3d.rotate",
|
|
155
155
|
"draw3d.rotation",
|
|
156
156
|
"draw3d.scale",
|
|
157
|
+
"draw3d.sizeunavailable",
|
|
157
158
|
"draw3d.sphere",
|
|
158
159
|
"draw3d.subtract",
|
|
159
160
|
"draw3d.thescale",
|
|
161
|
+
"draw3d.thesize",
|
|
160
162
|
"draw3d.translate",
|
|
161
163
|
"draw3d.undoBool",
|
|
162
164
|
"draw3d.union",
|
|
@@ -239,6 +241,8 @@
|
|
|
239
241
|
"identify.title",
|
|
240
242
|
"imageeditor.confirmclose",
|
|
241
243
|
"imageeditor.title",
|
|
244
|
+
"import3d.importing",
|
|
245
|
+
"import3d.noprocessesserver",
|
|
242
246
|
"importlayer.addfailed",
|
|
243
247
|
"importlayer.addlayer",
|
|
244
248
|
"importlayer.asgroup",
|
|
@@ -306,6 +310,7 @@
|
|
|
306
310
|
"map3d.title",
|
|
307
311
|
"mapexport.configuration",
|
|
308
312
|
"mapexport.format",
|
|
313
|
+
"mapexport.projection",
|
|
309
314
|
"mapexport.resolution",
|
|
310
315
|
"mapexport.scale",
|
|
311
316
|
"mapexport.size",
|
|
@@ -330,13 +335,12 @@
|
|
|
330
335
|
"maplegend.onlyvisible",
|
|
331
336
|
"maplegend.scaledependent",
|
|
332
337
|
"maplegend.windowtitle",
|
|
333
|
-
"maplight3d.ambientLightIntensity",
|
|
334
338
|
"maplight3d.animationstep",
|
|
335
339
|
"maplight3d.date",
|
|
336
340
|
"maplight3d.dayspersec",
|
|
337
|
-
"maplight3d.directionalLightIntensity",
|
|
338
341
|
"maplight3d.helpersVisible",
|
|
339
342
|
"maplight3d.minspersec",
|
|
343
|
+
"maplight3d.moonLightIntensity",
|
|
340
344
|
"maplight3d.normalBias",
|
|
341
345
|
"maplight3d.shadowBias",
|
|
342
346
|
"maplight3d.shadowMapSize",
|
|
@@ -346,6 +350,7 @@
|
|
|
346
350
|
"maplight3d.shadowintensity",
|
|
347
351
|
"maplight3d.shadows",
|
|
348
352
|
"maplight3d.showadvanced",
|
|
353
|
+
"maplight3d.sunLightIntensity",
|
|
349
354
|
"maplight3d.time",
|
|
350
355
|
"maplight3d.zFactor",
|
|
351
356
|
"measureComponent.absolute",
|
|
@@ -611,6 +616,7 @@
|
|
|
611
616
|
"valuetool.ymin",
|
|
612
617
|
"vectorlayerpicker.none",
|
|
613
618
|
"vectorlayerpicker.prompt",
|
|
619
|
+
"view3d.storingstate",
|
|
614
620
|
"window.close",
|
|
615
621
|
"window.detach",
|
|
616
622
|
"window.dock",
|
package/utils/IdentifyUtils.js
CHANGED
|
@@ -7,6 +7,6 @@ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof
|
|
|
7
7
|
*/import axios from"axios";import geojsonBbox from"geojson-bounding-box";import isEmpty from"lodash.isempty";import ol from"openlayers";import url from"url";import{v1 as uuidv1}from"uuid";import{LayerRole}from"../actions/layers";import ConfigUtils from"../utils/ConfigUtils";import CoordinatesUtils from"../utils/CoordinatesUtils";import LayerUtils from"../utils/LayerUtils";import MapUtils from"../utils/MapUtils";import VectorLayerUtils from"./VectorLayerUtils";function identifyRequestParams(layer,queryLayers,projection,params){var _layer$format;var format="text/plain";var infoFormats=layer.infoFormats||[];if(infoFormats.includes("text/xml")&&(layer.serverType==="qgis"||infoFormats.length===1)){format="text/xml"}else if(infoFormats.includes("application/geojson")){format="application/geojson"}else if(infoFormats.includes("application/geo+json")){format="application/geo+json"}else if(infoFormats.includes("application/json")){format="application/json"}else if(infoFormats.includes("text/xml;subtype=gml/3.2.1")){format="text/xml;subtype=gml/3.2.1"}else if(infoFormats.includes("text/xml;subtype=gml/3.2.0")){format="text/xml;subtype=gml/3.2.0"}else if(infoFormats.includes("text/xml;subtype=gml/3.2")){format="text/xml;subtype=gml/3.2"}else if(infoFormats.includes("text/xml;subtype=gml/3.1.1")){format="text/xml;subtype=gml/3.1.1"}else if(infoFormats.includes("text/xml;subtype=gml/3.1.0")){format="text/xml;subtype=gml/3.1.0"}else if(infoFormats.includes("text/xml;subtype=gml/3.1")){format="text/xml;subtype=gml/3.1"}else if(infoFormats.includes("text/xml;subtype=gml/3.0")){format="text/xml;subtype=gml/3.0"}else if(infoFormats.includes("text/html")){format="text/html"}else if(infoFormats.includes("application/vnd.ogc.gml")){format="application/vnd.ogc.gml"}var styles=(layer.params.STYLES||"").split(",");var styleMap=layer.params.LAYERS.split(",").reduce(function(res,lyr,idx){var _styles$idx;return _objectSpread(_objectSpread({},res),{},_defineProperty({},lyr,(_styles$idx=styles[idx])!==null&&_styles$idx!==void 0?_styles$idx:""))});var queryStyles=queryLayers.split(",").map(function(lyr){var _styleMap$lyr;return(_styleMap$lyr=styleMap[lyr])!==null&&_styleMap$lyr!==void 0?_styleMap$lyr:""}).join(",");return{url:layer.featureInfoUrl.split("?")[0],params:_objectSpread(_objectSpread(_objectSpread({},url.parse(layer.featureInfoUrl,true).query),{},{service:"WMS",version:layer.version,request:"GetFeatureInfo",id:layer.id,layers:queryLayers,query_layers:queryLayers,styles:queryStyles,srs:projection,crs:projection,format:(_layer$format=layer.format)!==null&&_layer$format!==void 0?_layer$format:"image/png",info_format:format,with_geometry:true,with_maptip:false},layer.dimensionValues),params)}}var IdentifyUtils={getQueryLayers:function getQueryLayers(maplayers,map){var queryableLayers=maplayers.filter(function(l){// All non-background WMS layers with a non-empty queryLayers list
|
|
8
8
|
return l.visibility&&l.type==="wms"&&l.role!==LayerRole.BACKGROUND&&(l.queryLayers||[]).length>0});var mapScale=MapUtils.computeForZoom(map.scales,map.zoom);var result=[];queryableLayers.forEach(function(layer){var layers=[];var queryLayers=layer.queryLayers;for(var i=0;i<queryLayers.length;++i){if(layer.externalLayerMap&&layer.externalLayerMap[queryLayers[i]]){var sublayer=LayerUtils.searchSubLayer(layer,"name",queryLayers[i]);var sublayerVisible=LayerUtils.layerScaleInRange(sublayer,mapScale);if(!isEmpty(layer.externalLayerMap[queryLayers[i]].queryLayers)&&sublayerVisible){layers.push(layer.externalLayerMap[queryLayers[i]])}}else if(layers.length>0&&layers[layers.length-1].id===layer.id){layers[layers.length-1].queryLayers.push(queryLayers[i])}else{layers.push(_objectSpread(_objectSpread({},layer),{},{queryLayers:[queryLayers[i]]}))}}result=result.concat(layers)});return result},buildRequest:function buildRequest(layer,queryLayers,center,map){var _layer$params$FILTER;var options=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};var size=[101,101];var resolution=MapUtils.computeForZoom(map.resolutions,map.zoom);var dx=0.5*resolution*size[0];var dy=0.5*resolution*size[1];var version=layer.version;var bbox=[center[0]-dx,center[1]-dy,center[0]+dx,center[1]+dy];if(CoordinatesUtils.getAxisOrder(map.projection).substr(0,2)==="ne"&&version==="1.3.0"){bbox=[center[1]-dx,center[0]-dy,center[1]+dx,center[0]+dy]}var params=_objectSpread({height:size[0],width:size[1],feature_count:100,x:Math.round(size[0]*0.5),y:Math.round(size[1]*0.5),i:Math.round(size[0]*0.5),j:Math.round(size[1]*0.5),bbox:bbox.join(","),filter:(_layer$params$FILTER=layer.params.FILTER)!==null&&_layer$params$FILTER!==void 0?_layer$params$FILTER:""},options);return identifyRequestParams(layer,queryLayers,map.projection,params)},buildFilterRequest:function buildFilterRequest(layer,queryLayers,filterGeom,map){var options=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};var params=_objectSpread({feature_count:100,FILTER_GEOM:filterGeom},options);return identifyRequestParams(layer,queryLayers,map.projection,params)},sendRequest:function sendRequest(request,responseHandler){var urlParts=url.parse(request.url,true);urlParts.query=_objectSpread(_objectSpread({},urlParts.query),request.params);delete urlParts.search;var requestUrl=url.format(urlParts);var maxUrlLength=ConfigUtils.getConfigProp("wmsMaxGetUrlLength",null,2048);if(requestUrl.length>maxUrlLength){// Switch to POST if url is too long
|
|
9
9
|
var reqUrlParts=requestUrl.split("?");var options={headers:{"content-type":"application/x-www-form-urlencoded"}};axios.post(reqUrlParts[0],reqUrlParts[1],options).then(function(postResp){responseHandler(postResp.data)})["catch"](function(){axios.get(request.url,{params:request.params}).then(function(getResp){responseHandler(getResp.data)})["catch"](function(){responseHandler(null)})})}else{axios.get(request.url,{params:request.params}).then(function(getResp){responseHandler(getResp.data)})["catch"](function(){responseHandler(null)})}},parseResponse:function parseResponse(response,layer,format,clickPoint,projection,featureInfoReturnsLayerName){var decimals=CoordinatesUtils.getPrecision(projection);var posstr=clickPoint?clickPoint[0].toFixed(decimals)+", "+clickPoint[1].toFixed(decimals):"";var results={};if(["application/json","application/geojson","application/geo+json","GeoJSON"].includes(format)){results=IdentifyUtils.parseGeoJSONResponse(response,projection,layer)}else if(format==="text/xml"){results=IdentifyUtils.parseXmlResponse(response,projection,layer,posstr,featureInfoReturnsLayerName)}else if(format==="application/vnd.ogc.gml"){results=IdentifyUtils.parseGmlResponse(response,projection,layer,posstr)}else if(format.startsWith("text/xml;subtype=gml/3.1")||format.startsWith("text/xml;subtype=gml/3.0")){results=IdentifyUtils.parseGml3Response(response,projection,layer)}else if(format.startsWith("text/xml;subtype=gml/3.2")){results=IdentifyUtils.parseGml32Response(response,projection,layer)}else if(format==="text/plain"){results[layer.name]=[{type:"text",text:response,id:posstr,layername:layer.name,layertitle:layer.title}]}else if(format==="text/html"){results[layer.name]=[{type:"html",text:response,id:posstr,layername:layer.name,layertitle:layer.title}]}// Add clickPos, bounding box, displayname and layer name / title
|
|
10
|
-
for(var _i=0,_Object$keys=Object.keys(results);_i<_Object$keys.length;_i++){var layername=_Object$keys[_i];var _iterator=_createForOfIteratorHelper(results[layername]),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _item$layertitle;var item=_step.value;if(item.type==="Feature"&&!item.bbox&&item.geometry){item.crs=projection;item.bbox=geojsonBbox(item)}item.clickPos=clickPoint;item.displayname=IdentifyUtils.determineDisplayName(layer,layername,item);item.layertitle=(_item$layertitle=item.layertitle)!==null&&_item$layertitle!==void 0?_item$layertitle:layername}}catch(err){_iterator.e(err)}finally{_iterator.f()}}return results},determineDisplayName:function determineDisplayName(layer,layername,item){var properties=item.properties||{};if(item.displayfield){if(properties[item.displayfield]&&properties[item.displayfield][0]!=="<"){return properties[item.displayfield]}}var sublayer=LayerUtils.searchSubLayer(layer,"name",layername);if(sublayer&&sublayer.displayField){if(properties[sublayer.displayField]&&properties[sublayer.displayField][0]!=="<"){return properties[sublayer.displayField]}}return properties.name||properties.Name||properties.NAME||item.id},parseXmlFeature:function parseXmlFeature(feature,geometrycrs,id,featurereport,displayfield,layername,layertitle,layerinfo){var featureResult={};featureResult.type="Feature";featureResult.id=id;featureResult.featurereport=featurereport;featureResult.displayfield=displayfield;featureResult.layername=layername;featureResult.layertitle=layertitle;featureResult.layerinfo=layerinfo;var bboxes=feature.getElementsByTagName("BoundingBox");if(bboxes.length>0){var bbox=bboxes[0];var crs=bbox.attributes.CRS?bbox.attributes.CRS.value:bbox.attributes.SRS.value;featureResult.bbox=[parseFloat(bbox.attributes.minx.value),parseFloat(bbox.attributes.miny.value),parseFloat(bbox.attributes.maxx.value),parseFloat(bbox.attributes.maxy.value)];featureResult.crs=crs}featureResult.properties={};var attrmapping={};var attributes=feature.getElementsByTagName("Attribute");for(var i=0;i<attributes.length;++i){var attribute=attributes[i];if(attribute.attributes.name.value==="geometry"){var wkt=attribute.attributes.value.value;var geoJsonFeature=VectorLayerUtils.wktToGeoJSON(wkt,geometrycrs,featureResult.crs);if(geoJsonFeature){featureResult.geometry=geoJsonFeature.geometry}}else{featureResult.properties[attribute.attributes.name.value]=attribute.attributes.value.value;if(attribute.attributes.attrname){attrmapping[attribute.attributes.name.value]=attribute.attributes.attrname.value}}}var htmlContent=feature.getElementsByTagName("HtmlContent");if(htmlContent.length>0){featureResult.properties.htmlContent=htmlContent[0].textContent;featureResult.properties.htmlContentInline=htmlContent[0].getAttribute("inline")==="1"||htmlContent[0].getAttribute("inline")==="true"}if(!isEmpty(attrmapping)){featureResult.attribnames=attrmapping}return featureResult},parseXmlResponse:function parseXmlResponse(response,geometrycrs,layer){var _this=this;var posstr=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;var featureInfoReturnsLayerName=arguments.length>4&&arguments[4]!==undefined?arguments[4]:false;var mapLayers=arguments.length>5&&arguments[5]!==undefined?arguments[5]:null;var parser=new DOMParser;var doc=parser.parseFromString(response,"text/xml");var layersEl=[].slice.call(doc.firstChild.getElementsByTagName("Layer"));var result={};var idcounter=0;var _iterator2=_createForOfIteratorHelper(layersEl),_step2;try{var _loop=function _loop(){var layerEl=_step2.value;var featurereport=layerEl.attributes.featurereport?layerEl.attributes.featurereport.value:null;var displayfield=layerEl.attributes.displayfield?layerEl.attributes.displayfield.value:null;var layername="";var layertitle="";if(layerEl.attributes.layername){layername=layerEl.attributes.layername.value;layertitle=layerEl.attributes.name.value}else if(featureInfoReturnsLayerName){var _LayerUtils$searchSub,_LayerUtils$searchSub2;layername=layerEl.attributes.name.value;layertitle=(_LayerUtils$searchSub=(_LayerUtils$searchSub2=LayerUtils.searchSubLayer(layer,"name",layername))===null||_LayerUtils$searchSub2===void 0?void 0:_LayerUtils$searchSub2.title)!==null&&_LayerUtils$searchSub!==void 0?_LayerUtils$searchSub:layername}else{var _LayerUtils$searchSub3,_LayerUtils$searchSub4;layertitle=layerEl.attributes.
|
|
10
|
+
for(var _i=0,_Object$keys=Object.keys(results);_i<_Object$keys.length;_i++){var layername=_Object$keys[_i];var _iterator=_createForOfIteratorHelper(results[layername]),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _item$layertitle;var item=_step.value;if(item.type==="Feature"&&!item.bbox&&item.geometry){item.crs=projection;item.bbox=geojsonBbox(item)}item.clickPos=clickPoint;item.displayname=IdentifyUtils.determineDisplayName(layer,layername,item);item.layertitle=(_item$layertitle=item.layertitle)!==null&&_item$layertitle!==void 0?_item$layertitle:layername}}catch(err){_iterator.e(err)}finally{_iterator.f()}}return results},determineDisplayName:function determineDisplayName(layer,layername,item){var properties=item.properties||{};if(item.displayfield){if(properties[item.displayfield]&&properties[item.displayfield][0]!=="<"){return properties[item.displayfield]}}var sublayer=LayerUtils.searchSubLayer(layer,"name",layername);if(sublayer&&sublayer.displayField){if(properties[sublayer.displayField]&&properties[sublayer.displayField][0]!=="<"){return properties[sublayer.displayField]}}return properties.name||properties.Name||properties.NAME||item.id},parseXmlFeature:function parseXmlFeature(feature,geometrycrs,id,featurereport,displayfield,layername,layertitle,layerinfo){var featureResult={};featureResult.type="Feature";featureResult.id=id;featureResult.featurereport=featurereport;featureResult.displayfield=displayfield;featureResult.layername=layername;featureResult.layertitle=layertitle;featureResult.layerinfo=layerinfo;var bboxes=feature.getElementsByTagName("BoundingBox");if(bboxes.length>0){var bbox=bboxes[0];var crs=bbox.attributes.CRS?bbox.attributes.CRS.value:bbox.attributes.SRS.value;featureResult.bbox=[parseFloat(bbox.attributes.minx.value),parseFloat(bbox.attributes.miny.value),parseFloat(bbox.attributes.maxx.value),parseFloat(bbox.attributes.maxy.value)];featureResult.crs=crs}featureResult.properties={};var attrmapping={};var attributes=feature.getElementsByTagName("Attribute");for(var i=0;i<attributes.length;++i){var attribute=attributes[i];if(attribute.attributes.name.value==="geometry"){var wkt=attribute.attributes.value.value;var geoJsonFeature=VectorLayerUtils.wktToGeoJSON(wkt,geometrycrs,featureResult.crs);if(geoJsonFeature){featureResult.geometry=geoJsonFeature.geometry}}else{featureResult.properties[attribute.attributes.name.value]=attribute.attributes.value.value;if(attribute.attributes.attrname){attrmapping[attribute.attributes.name.value]=attribute.attributes.attrname.value}}}var htmlContent=feature.getElementsByTagName("HtmlContent");if(htmlContent.length>0){featureResult.properties.htmlContent=htmlContent[0].textContent;featureResult.properties.htmlContentInline=htmlContent[0].getAttribute("inline")==="1"||htmlContent[0].getAttribute("inline")==="true"}if(!isEmpty(attrmapping)){featureResult.attribnames=attrmapping}return featureResult},parseXmlResponse:function parseXmlResponse(response,geometrycrs,layer){var _this=this;var posstr=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;var featureInfoReturnsLayerName=arguments.length>4&&arguments[4]!==undefined?arguments[4]:false;var mapLayers=arguments.length>5&&arguments[5]!==undefined?arguments[5]:null;var parser=new DOMParser;var doc=parser.parseFromString(response,"text/xml");var layersEl=[].slice.call(doc.firstChild.getElementsByTagName("Layer"));var result={};var idcounter=0;var _iterator2=_createForOfIteratorHelper(layersEl),_step2;try{var _loop=function _loop(){var layerEl=_step2.value;var featurereport=layerEl.attributes.featurereport?layerEl.attributes.featurereport.value:null;var displayfield=layerEl.attributes.displayfield?layerEl.attributes.displayfield.value:null;var layername="";var layertitle="";if(layerEl.attributes.layername){layername=layerEl.attributes.layername.value;layertitle=layerEl.attributes.name.value}else if(featureInfoReturnsLayerName){var _LayerUtils$searchSub,_LayerUtils$searchSub2;layername=layerEl.attributes.name.value;layertitle=(_LayerUtils$searchSub=(_LayerUtils$searchSub2=LayerUtils.searchSubLayer(layer,"name",layername))===null||_LayerUtils$searchSub2===void 0?void 0:_LayerUtils$searchSub2.title)!==null&&_LayerUtils$searchSub!==void 0?_LayerUtils$searchSub:layername}else{var _LayerUtils$searchSub3,_LayerUtils$searchSub4;layertitle=layerEl.attributes.name.value;layername=(_LayerUtils$searchSub3=(_LayerUtils$searchSub4=LayerUtils.searchSubLayer(layer,"title",layertitle))===null||_LayerUtils$searchSub4===void 0?void 0:_LayerUtils$searchSub4.name)!==null&&_LayerUtils$searchSub3!==void 0?_LayerUtils$searchSub3:layertitle}var layerinfo=layerEl.attributes.layerinfo?layerEl.attributes.layerinfo.value:null;var features=[].slice.call(layerEl.getElementsByTagName("Feature"));if(features.length>0){result[layername]=features.map(function(feature){return _this.parseXmlFeature(feature,geometrycrs,feature.attributes.id.value,featurereport,displayfield,layername,layertitle,layerinfo)})}else{var attributes=[].slice.call(layerEl.getElementsByTagName("Attribute"));if(attributes.length>0){var id=posstr||""+idcounter++;result[layername]=[_this.parseXmlFeature(layerEl,geometrycrs,id,featurereport,displayfield,layername,layertitle,layerinfo)]}}};for(_iterator2.s();!(_step2=_iterator2.n()).done;){_loop()}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}return result},parseGeoJSONResponse:function parseGeoJSONResponse(response,geometrycrs,layer){var result={};(response.features||[]).map(function(feature){// Deduce layer name as far as possible from feature id
|
|
11
11
|
var id=feature.id||(feature.properties||{}).OBJECTID||uuidv1();if(result[layer.name]===undefined){result[layer.name]=[]}var geometry=feature.geometry;if(geometry&&response.crs){var _response$crs$propert,_response$crs$propert2;// Reproject geometry only if there is crs information in GetFeatureInfo response
|
|
12
12
|
geometry=VectorLayerUtils.reprojectGeometry(geometry,(_response$crs$propert=(_response$crs$propert2=response.crs.properties)===null||_response$crs$propert2===void 0?void 0:_response$crs$propert2.name)!==null&&_response$crs$propert!==void 0?_response$crs$propert:"EPSG:4326",geometrycrs)}result[layer.name].push(_objectSpread(_objectSpread({},feature),{},{id:id,geometry:geometry,layername:layer.name,layertitle:layer.title}))});return result},parseGmlResponse:function parseGmlResponse(response,geometrycrs,layer,posstr){var parser=new DOMParser;var doc=parser.parseFromString(response,"text/xml");var result={};var msGMLOutput=doc.getElementsByTagName("msGMLOutput")[0];if(msGMLOutput){var count=0;var _iterator3=_createForOfIteratorHelper([].slice.call(msGMLOutput.children)),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var layerEl=_step3.value;var layerName=layerEl.nodeName.replace(/_layer$/,"");var featureName=layerName+"_feature";result[layerName]=[];var _iterator4=_createForOfIteratorHelper([].slice.call(layerEl.getElementsByTagName(featureName))),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var featureEl=_step4.value;var context=[{featureType:featureName}];var feature=new ol.format.GeoJSON().writeFeatureObject(new ol.format.GML2().readFeatureElement(featureEl,context));feature.id=count++;feature.layername=layer.name;feature.layertitle=layer.title;delete feature.properties.boundedBy;result[layerName].push(feature)}}catch(err){_iterator4.e(err)}finally{_iterator4.f()}}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}}else{result[layer.name]=[{type:"text",text:response,id:posstr}]}return result},parseGml3Response:function parseGml3Response(response,geometrycrs,layer){var _fmtGeoJson$writeFeat,_fmtGeoJson$writeFeat2;var fmtGml3=new ol.format.GML3;var fmtGeoJson=new ol.format.GeoJSON;return _defineProperty({},layer.name,(_fmtGeoJson$writeFeat=(_fmtGeoJson$writeFeat2=fmtGeoJson.writeFeaturesObject(fmtGml3.readFeatures(response)))===null||_fmtGeoJson$writeFeat2===void 0?void 0:_fmtGeoJson$writeFeat2.features)!==null&&_fmtGeoJson$writeFeat!==void 0?_fmtGeoJson$writeFeat:[])},parseGml32Response:function parseGml32Response(response,geometrycrs,layer){var _fmtGeoJson$writeFeat3,_fmtGeoJson$writeFeat4;var fmtGml32=new ol.format.GML32;var fmtGeoJson=new ol.format.GeoJSON;return _defineProperty({},layer.name,(_fmtGeoJson$writeFeat3=(_fmtGeoJson$writeFeat4=fmtGeoJson.writeFeaturesObject(fmtGml32.readFeatures(response)))===null||_fmtGeoJson$writeFeat4===void 0?void 0:_fmtGeoJson$writeFeat4.features)!==null&&_fmtGeoJson$writeFeat3!==void 0?_fmtGeoJson$writeFeat3:[])}};export default IdentifyUtils;
|
package/utils/MapUtils.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the BSD-style license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/import ConfigUtils from"./ConfigUtils";import CoordinatesUtils from"./CoordinatesUtils";var DEFAULT_SCREEN_DPI=96;var METERS_PER_UNIT={"m":1,"degrees":111194.87428468118,"ft":0.3048,"us-ft":1200/3937};var hooks={};var MapUtils={GET_PIXEL_FROM_COORDINATES_HOOK:"GET_PIXEL_FROM_COORDINATES_HOOK",GET_COORDINATES_FROM_PIXEL_HOOK:"GET_COORDINATES_FROM_PIXEL_HOOK",GET_SNAPPED_COORDINATES_FROM_PIXEL_HOOK:"GET_SNAPPED_COORDINATES_FROM_PIXEL_HOOK",GET_NATIVE_LAYER:"GET_NATIVE_LAYER",GET_MAP:"GET_MAP",registerHook:function registerHook(name,hook){hooks[name]=hook},getHook:function getHook(name){return hooks[name]},/**
|
|
8
|
+
*/import ConfigUtils from"./ConfigUtils";import CoordinatesUtils from"./CoordinatesUtils";var DEFAULT_SCREEN_DPI=96;var METERS_PER_UNIT={"m":1,"degrees":111194.87428468118,"ft":0.3048,"us-ft":1200/3937};var hooks={};var MapUtils={GET_PIXEL_FROM_COORDINATES_HOOK:"GET_PIXEL_FROM_COORDINATES_HOOK",GET_COORDINATES_FROM_PIXEL_HOOK:"GET_COORDINATES_FROM_PIXEL_HOOK",GET_SNAPPED_COORDINATES_FROM_PIXEL_HOOK:"GET_SNAPPED_COORDINATES_FROM_PIXEL_HOOK",GET_NATIVE_LAYER:"GET_NATIVE_LAYER",ADD_POINTER_MOVE_LISTENER:"ADD_POINTER_MOVE_LISTENER",REMOVE_POINTER_MOVE_LISTENER:"REMOVE_POINTER_MOVE_LISTENER",GET_MAP:"GET_MAP",registerHook:function registerHook(name,hook){hooks[name]=hook},getHook:function getHook(name){return hooks[name]},/**
|
|
9
9
|
* @param dpi {number} dot per inch resolution
|
|
10
10
|
* @return {number} dot per meter resolution
|
|
11
11
|
*/dpi2dpm:function dpi2dpm(dpi){return(dpi||DEFAULT_SCREEN_DPI)*(100/2.54)},/**
|
package/utils/PermaLinkUtils.js
CHANGED
|
@@ -5,7 +5,7 @@ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof
|
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/import axios from"axios";import url from"url";import{LayerRole}from"../actions/layers";import StandardApp from"../components/StandardApp";import ConfigUtils from"../utils/ConfigUtils";import LayerUtils from"../utils/LayerUtils";var UrlQuery={};var historyUpdateTimeout=null;var pendingParams={};export var UrlParams={updateParams:function updateParams(dict){var forceLocationUrl=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(ConfigUtils.getConfigProp("omitUrlParameterUpdates")===true){UrlQuery=Object.assign(UrlQuery,dict);var propNames=Object.getOwnPropertyNames(UrlQuery);var _iterator2=_createForOfIteratorHelper(propNames),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var propName=_step2.value;if(UrlQuery[propName]===undefined){delete UrlQuery[propName]}}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}if(!forceLocationUrl){return}}// Delay URL updates to avoid "Too many calls to Location or History APIs within a short timeframe."
|
|
8
|
-
if(historyUpdateTimeout!==null){clearTimeout(historyUpdateTimeout)}pendingParams=_objectSpread(_objectSpread({},pendingParams),dict);historyUpdateTimeout=setTimeout(function(){var urlObj=url.parse(window.location.href,true);urlObj.query=Object.assign(urlObj.query,pendingParams);var propNames=Object.getOwnPropertyNames(urlObj.query);var _iterator3=_createForOfIteratorHelper(propNames),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _propName=_step3.value;if(urlObj.query[_propName]===undefined){delete urlObj.query[_propName]}}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}delete urlObj.search;history.replaceState({id:urlObj.host},"",url.format(urlObj));historyUpdateTimeout=null;pendingParams={}},250)},getParam:function getParam(key){var urlObj=url.parse(window.location.href,true);if(ConfigUtils.getConfigProp("omitUrlParameterUpdates")===true){var _urlObj$query$key;return(_urlObj$query$key=urlObj.query[key])!==null&&_urlObj$query$key!==void 0?_urlObj$query$key:UrlQuery[key]}else{return urlObj.query[key]}},getParams:function getParams(){var query=url.parse(window.location.href,true).query;if(ConfigUtils.getConfigProp("omitUrlParameterUpdates")===true){return _objectSpread(_objectSpread({},UrlQuery),query)}else{return query}},clear:function clear(){
|
|
8
|
+
if(historyUpdateTimeout!==null){clearTimeout(historyUpdateTimeout)}pendingParams=_objectSpread(_objectSpread({},pendingParams),dict);historyUpdateTimeout=setTimeout(function(){var urlObj=url.parse(window.location.href,true);urlObj.query=Object.assign(urlObj.query,pendingParams);var propNames=Object.getOwnPropertyNames(urlObj.query);var _iterator3=_createForOfIteratorHelper(propNames),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _propName=_step3.value;if(urlObj.query[_propName]===undefined){delete urlObj.query[_propName]}}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}delete urlObj.search;history.replaceState({id:urlObj.host},"",url.format(urlObj));historyUpdateTimeout=null;pendingParams={}},250)},getParam:function getParam(key){var urlObj=url.parse(window.location.href,true);if(ConfigUtils.getConfigProp("omitUrlParameterUpdates")===true){var _urlObj$query$key;return(_urlObj$query$key=urlObj.query[key])!==null&&_urlObj$query$key!==void 0?_urlObj$query$key:UrlQuery[key]}else{return urlObj.query[key]}},getParams:function getParams(){var query=url.parse(window.location.href,true).query;if(ConfigUtils.getConfigProp("omitUrlParameterUpdates")===true){return _objectSpread(_objectSpread({},UrlQuery),query)}else{return query}},clear:function clear(){var clearKeys=["k","t","l","bl","bk","c","s","e","crs","st","sp","f","v","v3d","bl3d"];this.updateParams(clearKeys.reduce(function(res,key){return _objectSpread(_objectSpread({},res),{},_defineProperty({},key,undefined))},{}),true)},getFullUrl:function getFullUrl(){if(ConfigUtils.getConfigProp("omitUrlParameterUpdates")===true){var urlObj=url.parse(window.location.href,true);urlObj.query=UrlQuery;delete urlObj.search;return url.format(urlObj)}else{return window.location.href}}};var PermalinkDataHooks={};export function registerPermalinkDataStoreHook(key,storeFn){PermalinkDataHooks[key]=storeFn}export function unregisterPermalinkDataStoreHook(key){delete PermalinkDataHooks[key]}function executePermalinkDataStoreHooks(_x){return _executePermalinkDataStoreHooks.apply(this,arguments)}function _executePermalinkDataStoreHooks(){_executePermalinkDataStoreHooks=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(permalinkState){var _iteratorAbruptCompletion,_didIteratorError,_iteratorError,_iterator,_step,_step$value,key,storeFn;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_iteratorAbruptCompletion=false;_didIteratorError=false;_context.prev=2;_iterator=_asyncIterator(Object.entries(PermalinkDataHooks));case 4:_context.next=6;return _iterator.next();case 6:if(!(_iteratorAbruptCompletion=!(_step=_context.sent).done)){_context.next=14;break}_step$value=_slicedToArray(_step.value,2),key=_step$value[0],storeFn=_step$value[1];_context.next=10;return storeFn();case 10:permalinkState[key]=_context.sent;case 11:_iteratorAbruptCompletion=false;_context.next=4;break;case 14:_context.next=20;break;case 16:_context.prev=16;_context.t0=_context["catch"](2);_didIteratorError=true;_iteratorError=_context.t0;case 20:_context.prev=20;_context.prev=21;if(!(_iteratorAbruptCompletion&&_iterator["return"]!=null)){_context.next=25;break}_context.next=25;return _iterator["return"]();case 25:_context.prev=25;if(!_didIteratorError){_context.next=28;break}throw _iteratorError;case 28:return _context.finish(25);case 29:return _context.finish(20);case 30:case"end":return _context.stop()}},_callee,null,[[2,16,20,30],[21,,25,29]])}));return _executePermalinkDataStoreHooks.apply(this,arguments)}export function generatePermaLink(_x2){return _generatePermaLink.apply(this,arguments)}function _generatePermaLink(){_generatePermaLink=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(callback){var user,permittedGroup,state,fullUrl,permalinkState,exploded,redliningLayers,params,route,_args2=arguments;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:user=_args2.length>1&&_args2[1]!==undefined?_args2[1]:false;permittedGroup=_args2.length>2&&_args2[2]!==undefined?_args2[2]:"";state=StandardApp.store.getState();fullUrl=UrlParams.getFullUrl();if(ConfigUtils.getConfigProp("permalinkServiceUrl")){_context2.next=7;break}callback(fullUrl);return _context2.abrupt("return");case 7:permalinkState={};if(ConfigUtils.getConfigProp("storeAllLayersInPermalink")){permalinkState.layers=state.layers.flat.filter(function(layer){return layer.role!==LayerRole.BACKGROUND})}else{// Only store redlining layers
|
|
9
9
|
exploded=LayerUtils.explodeLayers(state.layers.flat.filter(function(layer){return layer.role!==LayerRole.BACKGROUND}));redliningLayers=exploded.map(function(entry,idx){return _objectSpread(_objectSpread({},entry),{},{pos:idx})}).filter(function(entry){return entry.layer.role===LayerRole.USERLAYER&&entry.layer.type==="vector"}).map(function(entry){return _objectSpread(_objectSpread({},entry.layer),{},{pos:entry.pos})});permalinkState.layers=redliningLayers}permalinkState.permalinkParams=state.localConfig.permalinkParams;permalinkState.url=fullUrl;params={permitted_group:permittedGroup||null};_context2.next=14;return executePermalinkDataStoreHooks(permalinkState);case 14:route=user?"userpermalink":"createpermalink";axios.post(ConfigUtils.getConfigProp("permalinkServiceUrl").replace(/\/$/,"")+"/"+route,permalinkState,{params:params}).then(function(response){return callback(response.data.permalink||fullUrl,response.data.expires||null)})["catch"](function(){return callback(fullUrl)});case 16:case"end":return _context2.stop()}},_callee2)}));return _generatePermaLink.apply(this,arguments)}export function resolvePermaLink(initialParams,callback){var key=initialParams.k;var bkey=initialParams.bk;if(key){axios.get(ConfigUtils.getConfigProp("permalinkServiceUrl").replace(/\/$/,"")+"/resolvepermalink?key="+key).then(function(response){var data=response.data;callback(_objectSpread(_objectSpread(_objectSpread({},initialParams),data.query||{}),data.state.permalinkParams||{}),data.state||{},!!data.query)})["catch"](function(){callback(initialParams,{},false)})}else if(bkey){axios.get(ConfigUtils.getConfigProp("permalinkServiceUrl").replace(/\/$/,"")+"/bookmarks/"+bkey).then(function(response){var data=response.data;callback(_objectSpread(_objectSpread(_objectSpread({},initialParams),data.query||{}),data.state.permalinkParams||{}),data.state||{},!!data.query)})["catch"](function(){callback(initialParams,{},false)})}else{callback(initialParams,{},true)}}export function resolveBookmark(bookmarkKey,callback){axios.get(ConfigUtils.getConfigProp("permalinkServiceUrl").replace(/\/$/,"")+"/bookmarks/"+bookmarkKey).then(function(response){var data=response.data;callback(_objectSpread({},data.query||{}),data.state||{},!!data.query)})["catch"](function(){callback(bookmarkKey,{},false)})}export function getUserBookmarks(user,callback){if(user){axios.get(ConfigUtils.getConfigProp("permalinkServiceUrl").replace(/\/$/,"")+"/bookmarks/").then(function(response){callback(response.data||[])})["catch"](function(){callback([])})}}export function createBookmark(_x3,_x4){return _createBookmark.apply(this,arguments)}function _createBookmark(){_createBookmark=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(description,callback){var state,exploded,bookmarkState,redliningLayers;return _regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(ConfigUtils.getConfigProp("permalinkServiceUrl")){_context3.next=3;break}callback(false);return _context3.abrupt("return");case 3:state=StandardApp.store.getState();// Only store redlining layers
|
|
10
10
|
exploded=LayerUtils.explodeLayers(state.layers.flat.filter(function(layer){return layer.role!==LayerRole.BACKGROUND}));bookmarkState={};if(ConfigUtils.getConfigProp("storeAllLayersInPermalink")){bookmarkState.layers=state.layers.flat.filter(function(layer){return layer.role!==LayerRole.BACKGROUND})}else{redliningLayers=exploded.map(function(entry,idx){return _objectSpread(_objectSpread({},entry),{},{pos:idx})}).filter(function(entry){return entry.layer.role===LayerRole.USERLAYER&&entry.layer.type==="vector"}).map(function(entry){return _objectSpread(_objectSpread({},entry.layer),{},{pos:entry.pos})});bookmarkState.layers=redliningLayers}bookmarkState.permalinkParams=state.localConfig.permalinkParams;bookmarkState.url=UrlParams.getFullUrl();_context3.next=11;return executePermalinkDataStoreHooks(bookmarkState);case 11:axios.post(ConfigUtils.getConfigProp("permalinkServiceUrl").replace(/\/$/,"")+"/bookmarks/"+"?description="+description,bookmarkState).then(function(){return callback(true)})["catch"](function(){return callback(false)});case 12:case"end":return _context3.stop()}},_callee3)}));return _createBookmark.apply(this,arguments)}export function updateBookmark(_x5,_x6,_x7){return _updateBookmark.apply(this,arguments)}function _updateBookmark(){_updateBookmark=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(bkey,description,callback){var state,exploded,bookmarkState,redliningLayers;return _regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(ConfigUtils.getConfigProp("permalinkServiceUrl")){_context4.next=3;break}callback(false);return _context4.abrupt("return");case 3:state=StandardApp.store.getState();// Only store redlining layers
|
|
11
11
|
exploded=LayerUtils.explodeLayers(state.layers.flat.filter(function(layer){return layer.role!==LayerRole.BACKGROUND}));bookmarkState={};if(ConfigUtils.getConfigProp("storeAllLayersInPermalink")){bookmarkState.layers=state.layers.flat.filter(function(layer){return layer.role!==LayerRole.BACKGROUND})}else{redliningLayers=exploded.map(function(entry,idx){return _objectSpread(_objectSpread({},entry),{},{pos:idx})}).filter(function(entry){return entry.layer.role===LayerRole.USERLAYER&&entry.layer.type==="vector"}).map(function(entry){return _objectSpread(_objectSpread({},entry.layer),{},{pos:entry.pos})});bookmarkState.layers=redliningLayers}bookmarkState.permalinkParams=state.localConfig.permalinkParams;bookmarkState.url=UrlParams.getFullUrl();_context4.next=11;return executePermalinkDataStoreHooks(bookmarkState);case 11:axios.put(ConfigUtils.getConfigProp("permalinkServiceUrl").replace(/\/$/,"")+"/bookmarks/"+bkey+"?description="+description,bookmarkState).then(function(){return callback(true)})["catch"](function(){return callback(false)});case 12:case"end":return _context4.stop()}},_callee4)}));return _updateBookmark.apply(this,arguments)}export function removeBookmark(bkey,callback){if(bkey){axios["delete"](ConfigUtils.getConfigProp("permalinkServiceUrl").replace(/\/$/,"")+"/bookmarks/"+bkey).then(function(){callback(true)})["catch"](function(){return callback(false)})}}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}/**
|
|
2
|
-
* Copyright 2015 GeoSolutions Sas
|
|
3
|
-
* Copyright 2016-2024 Sourcepole AG
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the BSD-style license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/import React from"react";import{connect}from"react-redux";import ol from"openlayers";import PropTypes from"prop-types";import"./style/ScaleBarSupport.css";/**
|
|
9
|
-
* Scalebar support for the map component.
|
|
10
|
-
*/var ScaleBarSupport=/*#__PURE__*/function(_React$Component){function ScaleBarSupport(props){var _this;_classCallCheck(this,ScaleBarSupport);_this=_callSuper(this,ScaleBarSupport,[props]);_defineProperty(_this,"componentWillUnmount",function(){if(_this.scalebar){_this.props.map.removeControl(_this.scalebar)}});_defineProperty(_this,"initScaleBar",function(el){_this.scalebar=new ol.control.ScaleLine(_objectSpread(_objectSpread({target:el},ScaleBarSupport.defaultOpt),_this.props.options));_this.props.map.addControl(_this.scalebar)});_this.scalebar=null;return _this}_inherits(ScaleBarSupport,_React$Component);return _createClass(ScaleBarSupport,[{key:"render",value:function render(){var style=this.props.mapMargins.splitTopAndBottomBar?{marginLeft:this.props.mapMargins.left+"px"}:{};return/*#__PURE__*/React.createElement("div",{id:"ScaleBar",ref:this.initScaleBar,style:style})}}])}(React.Component);_defineProperty(ScaleBarSupport,"propTypes",{map:PropTypes.object,mapMargins:PropTypes.object,/** See [OpenLayers API doc](https://openlayers.org/en/latest/apidoc/module-ol_control_ScaleLine-ScaleLine.html) */options:PropTypes.object});_defineProperty(ScaleBarSupport,"defaultOpt",{minWidth:64,units:"metric"});export default connect(function(state){return{mapMargins:state.windows.mapMargins}})(ScaleBarSupport);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
div#ScaleBar {
|
|
2
|
-
position: fixed;
|
|
3
|
-
z-index: 101;
|
|
4
|
-
bottom: 5px;
|
|
5
|
-
left: 5px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
div.ol-scale-line {
|
|
9
|
-
position: relative!important;
|
|
10
|
-
background-color: transparent;
|
|
11
|
-
left: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
div.ol-scale-line > div.ol-scale-line-inner {
|
|
16
|
-
color: var(--panel-text-color);
|
|
17
|
-
border-color: var(--panel-text-color);
|
|
18
|
-
}
|