From 8da31e43950f03e33649a9d8187f3af941b37dbf Mon Sep 17 00:00:00 2001 From: Lillian Wiegand Date: Wed, 10 Apr 2024 09:04:58 +0200 Subject: [PATCH 001/102] Measure Tool working for Distances --- package-lock.json | 35 +- package.json | 4 + packages/clients/dataportal/API.md | 5 + packages/clients/dataportal/LICENSE | 287 ++++++++ packages/clients/dataportal/README.md | 10 + packages/clients/dataportal/package-lock.json | 613 ++++++++++++++++++ packages/clients/dataportal/package.json | 33 + packages/clients/dataportal/src/addPlugins.ts | 133 ++++ packages/clients/dataportal/src/index.html | 108 +++ packages/clients/dataportal/src/language.ts | 68 ++ .../dataportal/src/mapConfiguration.ts | 208 ++++++ .../clients/dataportal/src/polar-client.ts | 75 +++ packages/clients/dataportal/tsconfig.json | 3 + packages/clients/dataportal/vite.config.js | 5 + packages/clients/snowbox/src/addPlugins.ts | 6 + .../createTextInteractions.ts | 4 +- packages/plugins/FeatureDistance/CHANGELOG.md | 9 + packages/plugins/FeatureDistance/LICENSE | 287 ++++++++ packages/plugins/FeatureDistance/README.md | 0 packages/plugins/FeatureDistance/package.json | 20 + .../src/components/ColorSlider.vue | 110 ++++ .../src/components/ExpansionPanel.vue | 52 ++ .../src/components/FeatureDistance.vue | 163 +++++ .../FeatureDistance/src/components/index.ts | 1 + packages/plugins/FeatureDistance/src/index.ts | 14 + .../plugins/FeatureDistance/src/language.ts | 62 ++ .../FeatureDistance/src/store/actions.ts | 56 ++ .../createDeleteInteraction.ts | 62 ++ .../src/store/createInteractions/index.ts | 66 ++ .../store/createStyles/createDeleteStyle.ts | 36 + .../src/store/createStyles/createDrawStyle.ts | 36 + .../store/createStyles/createModifyStyle.ts | 36 + .../store/createStyles/createSelectStyle.ts | 36 + .../src/store/createStyles/index.ts | 95 +++ .../FeatureDistance/src/store/index.ts | 60 ++ packages/plugins/FeatureDistance/src/types.ts | 35 + .../plugins/FeatureDistance/tsconfig.json | 3 + .../plugins/FeatureDistance/vite.config.js | 3 + packages/plugins/IconMenu/src/language.ts | 2 + 39 files changed, 2827 insertions(+), 14 deletions(-) create mode 100644 packages/clients/dataportal/API.md create mode 100644 packages/clients/dataportal/LICENSE create mode 100644 packages/clients/dataportal/README.md create mode 100644 packages/clients/dataportal/package-lock.json create mode 100644 packages/clients/dataportal/package.json create mode 100644 packages/clients/dataportal/src/addPlugins.ts create mode 100644 packages/clients/dataportal/src/index.html create mode 100644 packages/clients/dataportal/src/language.ts create mode 100644 packages/clients/dataportal/src/mapConfiguration.ts create mode 100644 packages/clients/dataportal/src/polar-client.ts create mode 100644 packages/clients/dataportal/tsconfig.json create mode 100644 packages/clients/dataportal/vite.config.js create mode 100644 packages/plugins/FeatureDistance/CHANGELOG.md create mode 100644 packages/plugins/FeatureDistance/LICENSE create mode 100644 packages/plugins/FeatureDistance/README.md create mode 100644 packages/plugins/FeatureDistance/package.json create mode 100644 packages/plugins/FeatureDistance/src/components/ColorSlider.vue create mode 100644 packages/plugins/FeatureDistance/src/components/ExpansionPanel.vue create mode 100644 packages/plugins/FeatureDistance/src/components/FeatureDistance.vue create mode 100644 packages/plugins/FeatureDistance/src/components/index.ts create mode 100644 packages/plugins/FeatureDistance/src/index.ts create mode 100644 packages/plugins/FeatureDistance/src/language.ts create mode 100644 packages/plugins/FeatureDistance/src/store/actions.ts create mode 100644 packages/plugins/FeatureDistance/src/store/createInteractions/createDeleteInteraction.ts create mode 100644 packages/plugins/FeatureDistance/src/store/createInteractions/index.ts create mode 100644 packages/plugins/FeatureDistance/src/store/createStyles/createDeleteStyle.ts create mode 100644 packages/plugins/FeatureDistance/src/store/createStyles/createDrawStyle.ts create mode 100644 packages/plugins/FeatureDistance/src/store/createStyles/createModifyStyle.ts create mode 100644 packages/plugins/FeatureDistance/src/store/createStyles/createSelectStyle.ts create mode 100644 packages/plugins/FeatureDistance/src/store/createStyles/index.ts create mode 100644 packages/plugins/FeatureDistance/src/store/index.ts create mode 100644 packages/plugins/FeatureDistance/src/types.ts create mode 100644 packages/plugins/FeatureDistance/tsconfig.json create mode 100644 packages/plugins/FeatureDistance/vite.config.js diff --git a/package-lock.json b/package-lock.json index 1dab6f4cd..4d3bc773e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "dependencies": { "@fortawesome/fontawesome-free": "^6.2.1", "@masterportal/masterportalapi": "2.8.0", + "@polar/client-generic": "^1.0.0", "@repositoryname/noop": "^1.0.6", "@repositoryname/vuex-generators": "^1.1.2", "focus-trap": "^7.2.0", @@ -5718,9 +5719,9 @@ } }, "node_modules/@petamoriken/float16": { - "version": "3.8.4", - "resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.8.4.tgz", - "integrity": "sha512-kB+NJ5Br56ZhElKsf0pM7/PQfrDdDVMRz8f0JM6eVOGE+L89z9hwcst9QvWBBnazzuqGTGtPsJNZoQ1JdNiGSQ==" + "version": "3.8.6", + "resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.8.6.tgz", + "integrity": "sha512-GNJhABTtcmt9al/nqdJPycwFD46ww2+q2zwZzTjY0dFFwUAFRw9zszvEr9osyJRd9krRGy6hUDopWUg9fX7VVw==" }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", @@ -5732,6 +5733,11 @@ "node": ">=14" } }, + "node_modules/@polar/client-generic": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@polar/client-generic/-/client-generic-1.0.0.tgz", + "integrity": "sha512-MYTFqTDEBXl5cQIBdJfr4OBUoYcDcEIVP4esO9550qZNseupZTXiRWq+9DKTZQ9jPZO37uExg3RWQxo7/xUPcw==" + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -11998,9 +12004,9 @@ } }, "node_modules/i18next": { - "version": "23.10.0", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.10.0.tgz", - "integrity": "sha512-/TgHOqsa7/9abUKJjdPeydoyDc0oTi/7u9F8lMSj6ufg4cbC1Oj3f/Jja7zj7WRIhEQKB7Q4eN6y68I9RDxxGQ==", + "version": "23.10.1", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.10.1.tgz", + "integrity": "sha512-NDiIzFbcs3O9PXpfhkjyf7WdqFn5Vq6mhzhtkXzj51aOcNuPNcTwuYNuXCpHsanZGHlHKL35G7huoFeVic1hng==", "funding": [ { "type": "individual", @@ -27112,9 +27118,9 @@ } }, "@petamoriken/float16": { - "version": "3.8.4", - "resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.8.4.tgz", - "integrity": "sha512-kB+NJ5Br56ZhElKsf0pM7/PQfrDdDVMRz8f0JM6eVOGE+L89z9hwcst9QvWBBnazzuqGTGtPsJNZoQ1JdNiGSQ==" + "version": "3.8.6", + "resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.8.6.tgz", + "integrity": "sha512-GNJhABTtcmt9al/nqdJPycwFD46ww2+q2zwZzTjY0dFFwUAFRw9zszvEr9osyJRd9krRGy6hUDopWUg9fX7VVw==" }, "@pkgjs/parseargs": { "version": "0.11.0", @@ -27123,6 +27129,11 @@ "dev": true, "optional": true }, + "@polar/client-generic": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@polar/client-generic/-/client-generic-1.0.0.tgz", + "integrity": "sha512-MYTFqTDEBXl5cQIBdJfr4OBUoYcDcEIVP4esO9550qZNseupZTXiRWq+9DKTZQ9jPZO37uExg3RWQxo7/xUPcw==" + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -31876,9 +31887,9 @@ } }, "i18next": { - "version": "23.10.0", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.10.0.tgz", - "integrity": "sha512-/TgHOqsa7/9abUKJjdPeydoyDc0oTi/7u9F8lMSj6ufg4cbC1Oj3f/Jja7zj7WRIhEQKB7Q4eN6y68I9RDxxGQ==", + "version": "23.10.1", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.10.1.tgz", + "integrity": "sha512-NDiIzFbcs3O9PXpfhkjyf7WdqFn5Vq6mhzhtkXzj51aOcNuPNcTwuYNuXCpHsanZGHlHKL35G7huoFeVic1hng==", "requires": { "@babel/runtime": "^7.23.2" } diff --git a/package.json b/package.json index 68482f713..57b7657a0 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "npm": "^8.19.3" }, "scripts": { + "dataportal": "cd packages/clients/dataportal/ && vite --host", "afm:build": "lerna run build --scope @polar/client-afm --stream && npm run docs:afm", "afm:build:serve": "http-server ./packages/clients/afm -o /example/prod-example.html", "afm:dev": "cd packages/clients/afm/ && vite --host", @@ -89,5 +90,8 @@ "vite-plugin-commonjs": "^0.6.2", "vue-jest": "^3.0.7", "vue-template-compiler": "^2.7.16" + }, + "dependencies": { + "@polar/client-generic": "^1.0.0" } } diff --git a/packages/clients/dataportal/API.md b/packages/clients/dataportal/API.md new file mode 100644 index 000000000..6a18bf187 --- /dev/null +++ b/packages/clients/dataportal/API.md @@ -0,0 +1,5 @@ +# Snowbox API Documentation + +This is an API file that is used as part of the generated documentation. It will appear as main document in the snowbox's documentation. + +If the snowbox implemented any own features that are not derived from either core of plugins, this would be the place to document them. However, since that's not the case, it only features this introduction text and the link list below. diff --git a/packages/clients/dataportal/LICENSE b/packages/clients/dataportal/LICENSE new file mode 100644 index 000000000..c29ce2f83 --- /dev/null +++ b/packages/clients/dataportal/LICENSE @@ -0,0 +1,287 @@ + EUROPEAN UNION PUBLIC LICENCE v. 1.2 + EUPL © the European Union 2007, 2016 + +This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined +below) which is provided under the terms of this Licence. Any use of the Work, +other than as authorised under this Licence is prohibited (to the extent such +use is covered by a right of the copyright holder of the Work). + +The Work is provided under the terms of this Licence when the Licensor (as +defined below) has placed the following notice immediately following the +copyright notice for the Work: + + Licensed under the EUPL + +or has expressed by any other means his willingness to license under the EUPL. + +1. Definitions + +In this Licence, the following terms have the following meaning: + +- ‘The Licence’: this Licence. + +- ‘The Original Work’: the work or software distributed or communicated by the + Licensor under this Licence, available as Source Code and also as Executable + Code as the case may be. + +- ‘Derivative Works’: the works or software that could be created by the + Licensee, based upon the Original Work or modifications thereof. This Licence + does not define the extent of modification or dependence on the Original Work + required in order to classify a work as a Derivative Work; this extent is + determined by copyright law applicable in the country mentioned in Article 15. + +- ‘The Work’: the Original Work or its Derivative Works. + +- ‘The Source Code’: the human-readable form of the Work which is the most + convenient for people to study and modify. + +- ‘The Executable Code’: any code which has generally been compiled and which is + meant to be interpreted by a computer as a program. + +- ‘The Licensor’: the natural or legal person that distributes or communicates + the Work under the Licence. + +- ‘Contributor(s)’: any natural or legal person who modifies the Work under the + Licence, or otherwise contributes to the creation of a Derivative Work. + +- ‘The Licensee’ or ‘You’: any natural or legal person who makes any usage of + the Work under the terms of the Licence. + +- ‘Distribution’ or ‘Communication’: any act of selling, giving, lending, + renting, distributing, communicating, transmitting, or otherwise making + available, online or offline, copies of the Work or providing access to its + essential functionalities at the disposal of any other natural or legal + person. + +2. Scope of the rights granted by the Licence + +The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, +sublicensable licence to do the following, for the duration of copyright vested +in the Original Work: + +- use the Work in any circumstance and for all usage, +- reproduce the Work, +- modify the Work, and make Derivative Works based upon the Work, +- communicate to the public, including the right to make available or display + the Work or copies thereof to the public and perform publicly, as the case may + be, the Work, +- distribute the Work or copies thereof, +- lend and rent the Work or copies thereof, +- sublicense rights in the Work or copies thereof. + +Those rights can be exercised on any media, supports and formats, whether now +known or later invented, as far as the applicable law permits so. + +In the countries where moral rights apply, the Licensor waives his right to +exercise his moral right to the extent allowed by law in order to make effective +the licence of the economic rights here above listed. + +The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to +any patents held by the Licensor, to the extent necessary to make use of the +rights granted on the Work under this Licence. + +3. Communication of the Source Code + +The Licensor may provide the Work either in its Source Code form, or as +Executable Code. If the Work is provided as Executable Code, the Licensor +provides in addition a machine-readable copy of the Source Code of the Work +along with each copy of the Work that the Licensor distributes or indicates, in +a notice following the copyright notice attached to the Work, a repository where +the Source Code is easily and freely accessible for as long as the Licensor +continues to distribute or communicate the Work. + +4. Limitations on copyright + +Nothing in this Licence is intended to deprive the Licensee of the benefits from +any exception or limitation to the exclusive rights of the rights owners in the +Work, of the exhaustion of those rights or of other applicable limitations +thereto. + +5. Obligations of the Licensee + +The grant of the rights mentioned above is subject to some restrictions and +obligations imposed on the Licensee. Those obligations are the following: + +Attribution right: The Licensee shall keep intact all copyright, patent or +trademarks notices and all notices that refer to the Licence and to the +disclaimer of warranties. The Licensee must include a copy of such notices and a +copy of the Licence with every copy of the Work he/she distributes or +communicates. The Licensee must cause any Derivative Work to carry prominent +notices stating that the Work has been modified and the date of modification. + +Copyleft clause: If the Licensee distributes or communicates copies of the +Original Works or Derivative Works, this Distribution or Communication will be +done under the terms of this Licence or of a later version of this Licence +unless the Original Work is expressly distributed only under this version of the +Licence — for example by communicating ‘EUPL v. 1.2 only’. The Licensee +(becoming Licensor) cannot offer or impose any additional terms or conditions on +the Work or Derivative Work that alter or restrict the terms of the Licence. + +Compatibility clause: If the Licensee Distributes or Communicates Derivative +Works or copies thereof based upon both the Work and another work licensed under +a Compatible Licence, this Distribution or Communication can be done under the +terms of this Compatible Licence. For the sake of this clause, ‘Compatible +Licence’ refers to the licences listed in the appendix attached to this Licence. +Should the Licensee's obligations under the Compatible Licence conflict with +his/her obligations under this Licence, the obligations of the Compatible +Licence shall prevail. + +Provision of Source Code: When distributing or communicating copies of the Work, +the Licensee will provide a machine-readable copy of the Source Code or indicate +a repository where this Source will be easily and freely available for as long +as the Licensee continues to distribute or communicate the Work. + +Legal Protection: This Licence does not grant permission to use the trade names, +trademarks, service marks, or names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the copyright notice. + +6. Chain of Authorship + +The original Licensor warrants that the copyright in the Original Work granted +hereunder is owned by him/her or licensed to him/her and that he/she has the +power and authority to grant the Licence. + +Each Contributor warrants that the copyright in the modifications he/she brings +to the Work are owned by him/her or licensed to him/her and that he/she has the +power and authority to grant the Licence. + +Each time You accept the Licence, the original Licensor and subsequent +Contributors grant You a licence to their contributions to the Work, under the +terms of this Licence. + +7. Disclaimer of Warranty + +The Work is a work in progress, which is continuously improved by numerous +Contributors. It is not a finished work and may therefore contain defects or +‘bugs’ inherent to this type of development. + +For the above reason, the Work is provided under the Licence on an ‘as is’ basis +and without warranties of any kind concerning the Work, including without +limitation merchantability, fitness for a particular purpose, absence of defects +or errors, accuracy, non-infringement of intellectual property rights other than +copyright as stated in Article 6 of this Licence. + +This disclaimer of warranty is an essential part of the Licence and a condition +for the grant of any rights to the Work. + +8. Disclaimer of Liability + +Except in the cases of wilful misconduct or damages directly caused to natural +persons, the Licensor will in no event be liable for any direct or indirect, +material or moral, damages of any kind, arising out of the Licence or of the use +of the Work, including without limitation, damages for loss of goodwill, work +stoppage, computer failure or malfunction, loss of data or any commercial +damage, even if the Licensor has been advised of the possibility of such damage. +However, the Licensor will be liable under statutory product liability laws as +far such laws apply to the Work. + +9. Additional agreements + +While distributing the Work, You may choose to conclude an additional agreement, +defining obligations or services consistent with this Licence. However, if +accepting obligations, You may act only on your own behalf and on your sole +responsibility, not on behalf of the original Licensor or any other Contributor, +and only if You agree to indemnify, defend, and hold each Contributor harmless +for any liability incurred by, or claims asserted against such Contributor by +the fact You have accepted any warranty or additional liability. + +10. Acceptance of the Licence + +The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ +placed under the bottom of a window displaying the text of this Licence or by +affirming consent in any other similar way, in accordance with the rules of +applicable law. Clicking on that icon indicates your clear and irrevocable +acceptance of this Licence and all of its terms and conditions. + +Similarly, you irrevocably accept this Licence and all of its terms and +conditions by exercising any rights granted to You by Article 2 of this Licence, +such as the use of the Work, the creation by You of a Derivative Work or the +Distribution or Communication by You of the Work or copies thereof. + +11. Information to the public + +In case of any Distribution or Communication of the Work by means of electronic +communication by You (for example, by offering to download the Work from a +remote location) the distribution channel or media (for example, a website) must +at least provide to the public the information requested by the applicable law +regarding the Licensor, the Licence and the way it may be accessible, concluded, +stored and reproduced by the Licensee. + +12. Termination of the Licence + +The Licence and the rights granted hereunder will terminate automatically upon +any breach by the Licensee of the terms of the Licence. + +Such a termination will not terminate the licences of any person who has +received the Work from the Licensee under the Licence, provided such persons +remain in full compliance with the Licence. + +13. Miscellaneous + +Without prejudice of Article 9 above, the Licence represents the complete +agreement between the Parties as to the Work. + +If any provision of the Licence is invalid or unenforceable under applicable +law, this will not affect the validity or enforceability of the Licence as a +whole. Such provision will be construed or reformed so as necessary to make it +valid and enforceable. + +The European Commission may publish other linguistic versions or new versions of +this Licence or updated versions of the Appendix, so far this is required and +reasonable, without reducing the scope of the rights granted by the Licence. New +versions of the Licence will be published with a unique version number. + +All linguistic versions of this Licence, approved by the European Commission, +have identical value. Parties can take advantage of the linguistic version of +their choice. + +14. Jurisdiction + +Without prejudice to specific agreement between parties, + +- any litigation resulting from the interpretation of this License, arising + between the European Union institutions, bodies, offices or agencies, as a + Licensor, and any Licensee, will be subject to the jurisdiction of the Court + of Justice of the European Union, as laid down in article 272 of the Treaty on + the Functioning of the European Union, + +- any litigation arising between other parties and resulting from the + interpretation of this License, will be subject to the exclusive jurisdiction + of the competent court where the Licensor resides or conducts its primary + business. + +15. Applicable Law + +Without prejudice to specific agreement between parties, + +- this Licence shall be governed by the law of the European Union Member State + where the Licensor has his seat, resides or has his registered office, + +- this licence shall be governed by Belgian law if the Licensor has no seat, + residence or registered office inside a European Union Member State. + +Appendix + +‘Compatible Licences’ according to Article 5 EUPL are: + +- GNU General Public License (GPL) v. 2, v. 3 +- GNU Affero General Public License (AGPL) v. 3 +- Open Software License (OSL) v. 2.1, v. 3.0 +- Eclipse Public License (EPL) v. 1.0 +- CeCILL v. 2.0, v. 2.1 +- Mozilla Public Licence (MPL) v. 2 +- GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 +- Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for + works other than software +- European Union Public Licence (EUPL) v. 1.1, v. 1.2 +- Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong + Reciprocity (LiLiQ-R+). + +The European Commission may update this Appendix to later versions of the above +licences without producing a new version of the EUPL, as long as they provide +the rights granted in Article 2 of this Licence and protect the covered Source +Code from exclusive appropriation. + +All other changes or additions to this Appendix require the production of a new +EUPL version. \ No newline at end of file diff --git a/packages/clients/dataportal/README.md b/packages/clients/dataportal/README.md new file mode 100644 index 000000000..7901c15aa --- /dev/null +++ b/packages/clients/dataportal/README.md @@ -0,0 +1,10 @@ +# Snowbox ❄️📦 + +Welcome to the Snowbox. + +This is + +- a sandbox +- a showbox +- a dev playground +- an example client diff --git a/packages/clients/dataportal/package-lock.json b/packages/clients/dataportal/package-lock.json new file mode 100644 index 000000000..a37e7d00b --- /dev/null +++ b/packages/clients/dataportal/package-lock.json @@ -0,0 +1,613 @@ +{ + "name": "@polar/client-dataportal", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@polar/client-dataportal", + "license": "EUPL-1.2", + "dependencies": { + "@polar/core": "*", + "@polar/lib-custom-types": "*", + "@polar/plugin-address-search": "*", + "@polar/plugin-attributions": "*", + "@polar/plugin-draw": "*", + "@polar/plugin-export": "*", + "@polar/plugin-fullscreen": "*", + "@polar/plugin-geo-location": "*", + "@polar/plugin-gfi": "*", + "@polar/plugin-icon-menu": "*", + "@polar/plugin-layer-chooser": "*", + "@polar/plugin-legend": "*", + "@polar/plugin-loading-indicator": "*", + "@polar/plugin-pins": "*", + "@polar/plugin-reverse-geocoder": "*", + "@polar/plugin-scale": "*", + "@polar/plugin-toast": "*", + "@polar/plugin-zoom": "*" + } + }, + "../../components": { + "name": "@polar/components", + "version": "2.1.1", + "license": "EUPL-1.2", + "peerDependencies": { + "@fortawesome/fontawesome-free": "^6.2.1", + "vue": "^2.6.14", + "vuetify": "^2.5.9", + "vuex": "^3.6.2" + } + }, + "../../core": { + "name": "@polar/core", + "version": "1.4.1", + "license": "EUPL-1.2", + "dependencies": { + "@fortawesome/fontawesome-free": "^6.2.1", + "@masterportal/masterportalapi": "2.8.0", + "@polar/components": "^2.0.0", + "@polar/lib-get-cluster": "^1.0.0", + "@polar/lib-idx": "^1.0.0", + "@polar/lib-invisible-style": "^1.0.0", + "@repositoryname/noop": "^1.0.6", + "@repositoryname/vuex-generators": "^1.1.2", + "hammerjs": "2.0.8", + "i18next": "^23.7.16", + "i18next-browser-languagedetector": "^7.2.0", + "i18next-vue": "^1.1.0", + "lodash.kebabcase": "^4.1.1", + "lodash.merge": "^4.6.2", + "olcs": "2.13.1", + "vue": "^2.6.14", + "vuetify": "^2.5.9", + "vuex": "^3.6.2" + }, + "devDependencies": { + "@polar/lib-custom-types": "^1.4.0" + }, + "peerDependencies": { + "ol": "^7.1.0" + } + }, + "../../core/node_modules/@polar/components": { + "resolved": "../../components", + "link": true + }, + "../../core/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../core/node_modules/@polar/lib-get-cluster": { + "resolved": "../../lib/getCluster", + "link": true + }, + "../../core/node_modules/@polar/lib-idx": { + "resolved": "../../lib/idx", + "link": true + }, + "../../core/node_modules/@polar/lib-invisible-style": { + "resolved": "../../lib/invisibleStyle", + "link": true + }, + "../../lib/getCluster": { + "name": "@polar/lib-get-cluster", + "version": "1.0.0", + "license": "EUPL-1.2", + "peerDependencies": { + "ol": "^7.1.0" + } + }, + "../../lib/getFeatures": { + "name": "@polar/lib-get-features", + "version": "1.0.1", + "license": "EUPL-1.2", + "peerDependencies": { + "ol": "^7.1.0" + } + }, + "../../lib/idx": { + "name": "@polar/lib-idx", + "version": "1.0.0", + "license": "EUPL-1.2" + }, + "../../lib/invisibleStyle": { + "name": "@polar/lib-invisible-style", + "version": "1.0.0", + "license": "EUPL-1.2", + "peerDependencies": { + "ol": "^7.1.0" + } + }, + "../../lib/passesBoundaryCheck": { + "name": "@polar/lib-passes-boundary-check", + "version": "2.0.0", + "dev": true, + "license": "EUPL-1.2", + "devDependencies": { + "@polar/lib-custom-types": "^1.1.0" + } + }, + "../../lib/passesBoundaryCheck/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../lib/testMountParameters": { + "name": "@polar/lib-test-mount-parameters", + "version": "1.2.1", + "dev": true, + "license": "EUPL-1.2", + "devDependencies": { + "@polar/lib-custom-types": "^1.4.1" + } + }, + "../../lib/testMountParameters/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../lib/tooltip": { + "name": "@polar/lib-tooltip", + "version": "1.0.0", + "dev": true, + "license": "EUPL-1.2", + "peerDependencies": { + "i18next": "^21.6.0" + } + }, + "../../plugins/AddressSearch": { + "name": "@polar/plugin-address-search", + "version": "1.2.1", + "license": "EUPL-1.2", + "dependencies": { + "@polar/lib-get-features": "^1.0.0", + "lodash.debounce": "^4.0.8" + }, + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0" + }, + "peerDependencies": { + "@masterportal/masterportalapi": "2.8.0", + "@repositoryname/vuex-generators": "^1.1.2", + "ol": "7.1.0", + "vue": "^2.6.14", + "vuex": "^3.6.2" + } + }, + "../../plugins/AddressSearch/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/AddressSearch/node_modules/@polar/lib-get-features": { + "resolved": "../../lib/getFeatures", + "link": true + }, + "../../plugins/Attributions": { + "name": "@polar/plugin-attributions", + "version": "1.2.1", + "license": "EUPL-1.2", + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0", + "@polar/lib-test-mount-parameters": "^1.0.0" + }, + "peerDependencies": { + "@repositoryname/noop": "^1.0.6", + "@repositoryname/vuex-generators": "^1.1.2", + "ol": "^7.1.0", + "vue": "^2.6.14", + "vuex": "^3.6.2" + } + }, + "../../plugins/Attributions/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/Attributions/node_modules/@polar/lib-test-mount-parameters": { + "resolved": "../../lib/testMountParameters", + "link": true + }, + "../../plugins/Draw": { + "name": "@polar/plugin-draw", + "version": "1.1.0", + "license": "EUPL-1.2", + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0" + }, + "peerDependencies": { + "@repositoryname/vuex-generators": "^1.1.2", + "ol": "^7.1.0", + "vue": "^2.6.14", + "vuex": "^3.6.2" + } + }, + "../../plugins/Draw/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/Export": { + "name": "@polar/plugin-export", + "version": "1.2.0", + "license": "EUPL-1.2", + "dependencies": { + "jspdf": "^2.4.0" + }, + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0" + }, + "peerDependencies": { + "@repositoryname/vuex-generators": "^1.1.2", + "vue": "^2.6.14", + "vuex": "^3.6.2" + } + }, + "../../plugins/Export/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/Fullscreen": { + "name": "@polar/plugin-fullscreen", + "version": "1.2.1", + "license": "EUPL-1.2", + "dependencies": { + "@masterportal/masterportalapi": "2.8.0" + }, + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0", + "@polar/lib-test-mount-parameters": "^1.0.0" + } + }, + "../../plugins/Fullscreen/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/Fullscreen/node_modules/@polar/lib-test-mount-parameters": { + "resolved": "../../lib/testMountParameters", + "link": true + }, + "../../plugins/GeoLocation": { + "name": "@polar/plugin-geo-location", + "version": "1.3.0", + "license": "EUPL-1.2", + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0", + "@polar/lib-passes-boundary-check": "^2.0.0", + "@polar/lib-test-mount-parameters": "^1.0.0", + "@polar/lib-tooltip": "^1.0.0" + } + }, + "../../plugins/GeoLocation/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/GeoLocation/node_modules/@polar/lib-passes-boundary-check": { + "resolved": "../../lib/passesBoundaryCheck", + "link": true + }, + "../../plugins/GeoLocation/node_modules/@polar/lib-test-mount-parameters": { + "resolved": "../../lib/testMountParameters", + "link": true + }, + "../../plugins/GeoLocation/node_modules/@polar/lib-tooltip": { + "resolved": "../../lib/tooltip", + "link": true + }, + "../../plugins/Gfi": { + "name": "@polar/plugin-gfi", + "version": "1.2.2", + "license": "EUPL-1.2", + "dependencies": { + "just-compare": "^2.3.0", + "lodash.debounce": "^4.0.8" + }, + "devDependencies": { + "@polar/lib-custom-types": "^1.2.0", + "@polar/lib-get-cluster": "^1.0.0", + "@polar/lib-invisible-style": "^1.0.0", + "@polar/lib-test-mount-parameters": "^1.1.0", + "@polar/lib-tooltip": "^1.0.0" + }, + "peerDependencies": { + "@masterportal/masterportalapi": "2.8.0", + "@repositoryname/vuex-generators": "^1.1.2", + "ol": "^7.1.0", + "vue": "^2.6.14", + "vuex": "^3.6.2" + } + }, + "../../plugins/Gfi/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/Gfi/node_modules/@polar/lib-get-cluster": { + "resolved": "../../lib/getCluster", + "link": true + }, + "../../plugins/Gfi/node_modules/@polar/lib-invisible-style": { + "resolved": "../../lib/invisibleStyle", + "link": true + }, + "../../plugins/Gfi/node_modules/@polar/lib-test-mount-parameters": { + "resolved": "../../lib/testMountParameters", + "link": true + }, + "../../plugins/Gfi/node_modules/@polar/lib-tooltip": { + "resolved": "../../lib/tooltip", + "link": true + }, + "../../plugins/IconMenu": { + "name": "@polar/plugin-icon-menu", + "version": "1.2.0", + "license": "EUPL-1.2", + "devDependencies": { + "@polar/lib-custom-types": "^1.2.0", + "@polar/lib-test-mount-parameters": "^1.1.0" + }, + "peerDependencies": { + "@repositoryname/vuex-generators": "^1.1.2", + "vue": "^2.6.14", + "vuex": "^3.6.2" + } + }, + "../../plugins/IconMenu/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/IconMenu/node_modules/@polar/lib-test-mount-parameters": { + "resolved": "../../lib/testMountParameters", + "link": true + }, + "../../plugins/LayerChooser": { + "name": "@polar/plugin-layer-chooser", + "version": "1.2.0", + "license": "EUPL-1.2", + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0", + "@polar/lib-test-mount-parameters": "^1.0.0" + }, + "peerDependencies": { + "@repositoryname/vuex-generators": "^1.1.2", + "vue": "^2.6.14", + "vuex": "^3.6.2" + } + }, + "../../plugins/LayerChooser/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/LayerChooser/node_modules/@polar/lib-test-mount-parameters": { + "resolved": "../../lib/testMountParameters", + "link": true + }, + "../../plugins/Legend": { + "name": "@polar/plugin-legend", + "version": "1.1.0", + "license": "EUPL-1.2", + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0" + }, + "peerDependencies": { + "@masterportal/masterportalapi": "2.8.0" + } + }, + "../../plugins/Legend/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/LoadingIndicator": { + "name": "@polar/plugin-loading-indicator", + "version": "1.1.0", + "license": "EUPL-1.2", + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0" + }, + "peerDependencies": { + "vue": "^2.6.14", + "vuex": "^3.6.2" + } + }, + "../../plugins/LoadingIndicator/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/Pins": { + "name": "@polar/plugin-pins", + "version": "1.3.0", + "license": "EUPL-1.2", + "dependencies": { + "@polar/lib-idx": "*" + }, + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0", + "@polar/lib-idx": "^1.0.0", + "@polar/lib-passes-boundary-check": "^2.0.0", + "@polar/lib-test-mount-parameters": "^1.0.0" + }, + "peerDependencies": { + "@repositoryname/vuex-generators": "^1.1.2", + "ol": "^7.1.0", + "vue": "^2.6.14", + "vuex": "^3.6.2" + } + }, + "../../plugins/Pins/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/Pins/node_modules/@polar/lib-idx": { + "resolved": "../../lib/idx", + "link": true + }, + "../../plugins/Pins/node_modules/@polar/lib-passes-boundary-check": { + "resolved": "../../lib/passesBoundaryCheck", + "link": true + }, + "../../plugins/Pins/node_modules/@polar/lib-test-mount-parameters": { + "resolved": "../../lib/testMountParameters", + "link": true + }, + "../../plugins/ReverseGeocoder": { + "name": "@polar/plugin-reverse-geocoder", + "version": "1.2.0", + "license": "EUPL-1.2", + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0", + "lodash.mapvalues": "^4.6.0" + }, + "peerDependencies": { + "ol": "^7.1.0", + "xml2js": "^0.4.23" + } + }, + "../../plugins/ReverseGeocoder/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/Scale": { + "name": "@polar/plugin-scale", + "version": "1.1.0", + "license": "EUPL-1.2", + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0", + "@polar/lib-test-mount-parameters": "^1.0.0" + }, + "peerDependencies": { + "@repositoryname/vuex-generators": "^1.1.2", + "i18next": "^21.6.0", + "ol": "^7.1.0", + "vue": "^2.6.14", + "vuex": "^3.6.2" + } + }, + "../../plugins/Scale/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/Scale/node_modules/@polar/lib-test-mount-parameters": { + "resolved": "../../lib/testMountParameters", + "link": true + }, + "../../plugins/Toast": { + "name": "@polar/plugin-toast", + "version": "1.1.0", + "license": "EUPL-1.2", + "dependencies": { + "lodash.merge": "^4.6.2" + }, + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0", + "@polar/lib-test-mount-parameters": "^1.0.0" + }, + "peerDependencies": { + "@repositoryname/vuex-generators": "^1.1.2", + "vue": "^2.6.14", + "vuex": "^3.6.2" + } + }, + "../../plugins/Toast/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/Toast/node_modules/@polar/lib-test-mount-parameters": { + "resolved": "../../lib/testMountParameters", + "link": true + }, + "../../plugins/Zoom": { + "name": "@polar/plugin-zoom", + "version": "1.2.0", + "license": "EUPL-1.2", + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0", + "@polar/lib-test-mount-parameters": "^1.0.0" + }, + "peerDependencies": { + "@repositoryname/vuex-generators": "^1.1.2", + "vue": "^2.6.14", + "vuex": "^3.6.2" + } + }, + "../../plugins/Zoom/node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "../../plugins/Zoom/node_modules/@polar/lib-test-mount-parameters": { + "resolved": "../../lib/testMountParameters", + "link": true + }, + "../../types/custom": { + "name": "@polar/lib-custom-types", + "version": "1.4.1", + "dev": true, + "license": "EUPL-1.2" + }, + "node_modules/@polar/core": { + "resolved": "../../core", + "link": true + }, + "node_modules/@polar/lib-custom-types": { + "resolved": "../../types/custom", + "link": true + }, + "node_modules/@polar/plugin-address-search": { + "resolved": "../../plugins/AddressSearch", + "link": true + }, + "node_modules/@polar/plugin-attributions": { + "resolved": "../../plugins/Attributions", + "link": true + }, + "node_modules/@polar/plugin-draw": { + "resolved": "../../plugins/Draw", + "link": true + }, + "node_modules/@polar/plugin-export": { + "resolved": "../../plugins/Export", + "link": true + }, + "node_modules/@polar/plugin-fullscreen": { + "resolved": "../../plugins/Fullscreen", + "link": true + }, + "node_modules/@polar/plugin-geo-location": { + "resolved": "../../plugins/GeoLocation", + "link": true + }, + "node_modules/@polar/plugin-gfi": { + "resolved": "../../plugins/Gfi", + "link": true + }, + "node_modules/@polar/plugin-icon-menu": { + "resolved": "../../plugins/IconMenu", + "link": true + }, + "node_modules/@polar/plugin-layer-chooser": { + "resolved": "../../plugins/LayerChooser", + "link": true + }, + "node_modules/@polar/plugin-legend": { + "resolved": "../../plugins/Legend", + "link": true + }, + "node_modules/@polar/plugin-loading-indicator": { + "resolved": "../../plugins/LoadingIndicator", + "link": true + }, + "node_modules/@polar/plugin-pins": { + "resolved": "../../plugins/Pins", + "link": true + }, + "node_modules/@polar/plugin-reverse-geocoder": { + "resolved": "../../plugins/ReverseGeocoder", + "link": true + }, + "node_modules/@polar/plugin-scale": { + "resolved": "../../plugins/Scale", + "link": true + }, + "node_modules/@polar/plugin-toast": { + "resolved": "../../plugins/Toast", + "link": true + }, + "node_modules/@polar/plugin-zoom": { + "resolved": "../../plugins/Zoom", + "link": true + } + } +} diff --git a/packages/clients/dataportal/package.json b/packages/clients/dataportal/package.json new file mode 100644 index 000000000..0f4e2a4d8 --- /dev/null +++ b/packages/clients/dataportal/package.json @@ -0,0 +1,33 @@ +{ + "name": "@polar/client-dataportal", + "private": true, + "description": "Snow❄️📦box", + "license": "EUPL-1.2", + "type": "module", + "author": "Dataport AöR ", + "scripts": { + "build": "rimraf dist && vite build && bash ../dish/scripts/injectFlag.sh" + }, + "//": "Don't push versions but '*'. Do locally as you desire.", + "dependencies": { + "@polar/core": "*", + "@polar/lib-custom-types": "*", + "@polar/plugin-address-search": "*", + "@polar/plugin-attributions": "*", + "@polar/plugin-draw": "*", + "@polar/plugin-export": "*", + "@polar/plugin-feature-distance": "*", + "@polar/plugin-fullscreen": "*", + "@polar/plugin-geo-location": "*", + "@polar/plugin-gfi": "*", + "@polar/plugin-icon-menu": "*", + "@polar/plugin-layer-chooser": "*", + "@polar/plugin-legend": "*", + "@polar/plugin-loading-indicator": "*", + "@polar/plugin-pins": "*", + "@polar/plugin-reverse-geocoder": "*", + "@polar/plugin-scale": "*", + "@polar/plugin-toast": "*", + "@polar/plugin-zoom": "*" + } +} diff --git a/packages/clients/dataportal/src/addPlugins.ts b/packages/clients/dataportal/src/addPlugins.ts new file mode 100644 index 000000000..a71bd063a --- /dev/null +++ b/packages/clients/dataportal/src/addPlugins.ts @@ -0,0 +1,133 @@ +import merge from 'lodash.merge' +import { setLayout, NineLayout, NineLayoutTag } from '@polar/core' +import AddressSearch from '@polar/plugin-address-search' +import Attributions from '@polar/plugin-attributions' +import Draw from '@polar/plugin-draw' +import Export from '@polar/plugin-export' +import FeatureDistance from '@polar/plugin-feature-distance' +import Fullscreen from '@polar/plugin-fullscreen' +import GeoLocation from '@polar/plugin-geo-location' +import Gfi from '@polar/plugin-gfi' +import IconMenu from '@polar/plugin-icon-menu' +import LayerChooser from '@polar/plugin-layer-chooser' +import Legend from '@polar/plugin-legend' +import LoadingIndicator from '@polar/plugin-loading-indicator' +import Pins from '@polar/plugin-pins' +import ReverseGeocoder from '@polar/plugin-reverse-geocoder' +import Scale from '@polar/plugin-scale' +import Toast from '@polar/plugin-toast' +import Zoom from '@polar/plugin-zoom' + +const defaultOptions = { + displayComponent: true, + layoutTag: NineLayoutTag.TOP_LEFT, +} + +// this is acceptable for list-like functions +// eslint-disable-next-line max-lines-per-function +export const addPlugins = (core) => { + setLayout(NineLayout) + + const iconMenu = IconMenu({ + menus: [ + { + plugin: LayerChooser({}), + icon: 'fa-layer-group', + id: 'layerChooser', + }, + { + plugin: FeatureDistance({}), + icon: 'fa-pen-ruler', + id: 'featureDistance', + }, + { + plugin: Draw({}), + icon: 'fa-pencil', + id: 'draw', + }, + { + plugin: Zoom({ renderType: 'iconMenu' }), + id: 'zoom', + }, + { + plugin: Fullscreen({ renderType: 'iconMenu' }), + id: 'fullscreen', + }, + { + plugin: GeoLocation({ renderType: 'iconMenu' }), + id: 'geoLocation', + }, + { + plugin: Attributions({ + renderType: 'iconMenu', + listenToChanges: [ + 'plugin/zoom/zoomLevel', + 'plugin/layerChooser/activeBackgroundId', + 'plugin/layerChooser/activeMaskIds', + ], + }), + icon: 'fa-regular fa-copyright', + id: 'attributions', + }, + ], + displayComponent: true, + initiallyOpen: 'layerChooser', + layoutTag: NineLayoutTag.TOP_RIGHT, + }) + + core.addPlugins([ + AddressSearch( + merge({}, defaultOptions, { + layoutTag: NineLayoutTag.TOP_LEFT, + addLoading: 'plugin/loadingIndicator/addLoadingKey', + removeLoading: 'plugin/loadingIndicator/removeLoadingKey', + }) + ), + iconMenu, + Export( + merge({}, defaultOptions, { + layoutTag: NineLayoutTag.BOTTOM_LEFT, + }) + ), + LoadingIndicator( + merge({}, defaultOptions, { + layoutTag: NineLayoutTag.MIDDLE_MIDDLE, + }) + ), + Legend({ + displayComponent: true, + maxWidth: 500, + layoutTag: NineLayoutTag.BOTTOM_RIGHT, + }), + Scale( + merge({}, defaultOptions, { + layoutTag: NineLayoutTag.BOTTOM_RIGHT, + }) + ), + Toast( + merge({}, defaultOptions, { + layoutTag: NineLayoutTag.BOTTOM_MIDDLE, + }) + ), + Pins( + merge({}, defaultOptions, { + appearOnClick: { show: true, atZoomLevel: 6 }, + coordinateSource: 'plugin/addressSearch/chosenAddress', + toastAction: 'plugin/toast/addToast', + }) + ), + Gfi( + merge({}, defaultOptions, { + layoutTag: NineLayoutTag.MIDDLE_LEFT, + }) + ), + ReverseGeocoder({ + url: 'https://geodienste.hamburg.de/HH_WPS', + addLoading: 'plugin/loadingIndicator/addLoadingKey', + removeLoading: 'plugin/loadingIndicator/removeLoadingKey', + coordinateSource: 'plugin/pins/transformedCoordinate', + addressTarget: 'plugin/addressSearch/selectResult', + zoomTo: 7, + }), + ]) +} diff --git a/packages/clients/dataportal/src/index.html b/packages/clients/dataportal/src/index.html new file mode 100644 index 000000000..88236e6b5 --- /dev/null +++ b/packages/clients/dataportal/src/index.html @@ -0,0 +1,108 @@ + + + + Dataportal + + + + + + + +

Dataportal Dev

+ +
+ +
+

Example for programmatic information binding

+

+ This illustrates which kind of data can be retrieved from the map client. +

+

Current distance:

+

Current zoom level:

+

GFI information:

+

PIN coordinates:

+

+ Address search result: +


+    

+

+ Map export: + +

+ + + + diff --git a/packages/clients/dataportal/src/language.ts b/packages/clients/dataportal/src/language.ts new file mode 100644 index 000000000..4a73f9327 --- /dev/null +++ b/packages/clients/dataportal/src/language.ts @@ -0,0 +1,68 @@ +import { LanguageOption } from '@polar/lib-custom-types' + +const language: LanguageOption[] = [ + { + type: 'de', + resources: { + snowbox: { + attributions: { + basemap: 'Basemap © basemap.de / BKG ', + basemapGrey: 'Basemap Grau © basemap.de / BKG ', + underground: + 'Strecken U-Bahn © Freie und Hansestadt Hamburg, Behörde für Wirtschaft, Verkehr und Innovation', + rapid: + 'Strecken S-Bahn © Freie und Hansestadt Hamburg, Behörde für Wirtschaft, Verkehr und Innovation', + hamburgBorder: 'Landesgrenze Hamburg © Freie und Hansestadt Hamburg', + }, + layers: { + basemap: 'Basemap.de (Farbe)', + basemapGrey: 'Basemap.de (Grau)', + underground: 'U-Bahn', + rapid: 'S-Bahn', + hamburgBorder: 'Landesgrenze Hamburg', + }, + }, + plugins: { + pins: { + toast: { + notInBoundary: + 'Der Testklient ist auf Hamburg eingeschränkt. Bitte wählen Sie eine Position in Hamburg.', + }, + }, + }, + }, + }, + { + type: 'en', + resources: { + snowbox: { + attributions: { + basemap: 'Basemap © basemap.de / BKG ', + basemapGrey: 'Basemap Grey © basemap.de / BKG ', + underground: + 'Railway Lines U-Bahn © Freie und Hansestadt Hamburg, Behörde für Wirtschaft, Verkehr und Innovation', + rapid: + 'Railway Lines S-Bahn © Freie und Hansestadt Hamburg, Behörde für Wirtschaft, Verkehr und Innovation', + hamburgBorder: 'City border Hamburg © Freie und Hansestadt Hamburg', + }, + layers: { + basemap: 'Basemap.de (Coloured)', + basemapGrey: 'Basemap.de (Grey)', + underground: 'Underground railway (U-Bahn)', + rapid: 'City rapid railway (S-Bahn)', + hamburgBorder: 'City border Hamburg', + }, + }, + plugins: { + pins: { + toast: { + notInBoundary: + 'The test client is restricted to Hamburg. Please choose a position in Hamburg.', + }, + }, + }, + }, + }, +] + +export default language diff --git a/packages/clients/dataportal/src/mapConfiguration.ts b/packages/clients/dataportal/src/mapConfiguration.ts new file mode 100644 index 000000000..35e47c246 --- /dev/null +++ b/packages/clients/dataportal/src/mapConfiguration.ts @@ -0,0 +1,208 @@ +import language from './language' + +const eigengrau = '#16161d' +const somewhatBlue = '#002177' +const notQuiteWhite = '#f2f3f4' +const dataportRed = '#9E292B' + +const basemapId = '23420' +const basemapGreyId = '23421' +const sBahn = '23050' +const uBahn = '23053' + +const test = '158' + +const hamburgBorder = '6074' + +/** + * bitbucket.org/geowerkstatt-hamburg/masterportalapi/src/master/src/defaults.js + * implicitly using masterportalAPI HH defaults by fallback + * they can be overwritten in this object + */ +export const mapConfiguration = { + + startResolution: 0.6614579761460262, + startCenter: [569052.1509484207,5932876.7195253875], + extent: [540000.0, 5922500.0, 600000.0, 7025000.0], + language: 'en', + epsg: 'EPSG:25832', + locales: language, + vuetify: { + theme: { + themes: { + light: { + primary: dataportRed, + primaryContrast: notQuiteWhite, + secondary: eigengrau, + secondaryContrast: notQuiteWhite, + }, + }, + }, + }, + namedProjections: [ + [ + 'EPSG:25832', + '+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs', + ], + [ + 'EPSG:4326', + '+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs', + ], + [ + 'EPSG:4647', + '+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=32500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs', + ], + ], + addressSearch: { + searchMethods: [ + { + queryParameters: { + searchAddress: true, + searchStreets: true, + searchHouseNumbers: true, + }, + type: 'mpapi', + url: 'https://geodienste.hamburg.de/HH_WFS_GAGES?service=WFS&request=GetFeature&version=2.0.0', + }, + ], + minLength: 3, + waitMs: 300, + }, + attributions: { + initiallyOpen: false, + windowWidth: 300, + layerAttributions: [ + { + id: basemapId, + title: 'snowbox.attributions.basemap', + }, + { + id: basemapGreyId, + title: 'snowbox.attributions.basemapGrey', + }, + { + id: uBahn, + title: 'snowbox.attributions.underground', + }, + { + id: sBahn, + title: 'snowbox.attributions.rapid', + }, + { + id: test, + title: 'test', + }, + ], + }, + draw: { + selectableDrawModes: ['Circle', 'LineString', 'Point', 'Polygon', 'Text'], + textStyle: { + font: { + size: [10, 20, 30], + family: 'Arial', + }, + }, + style: { + fill: { color: 'rgba(255, 255, 255, 0.5)' }, + stroke: { + color: '#e51313', + width: 2, + }, + circle: { + radius: 7, + fillColor: '#e51313', + }, + }, + }, + export: { + showPng: true, + showJpg: false, + showPdf: false, + }, + geoLocation: { + checkLocationInitially: false, + zoomLevel: 9, + }, + gfi: { + layers: { + [uBahn]: { + geometry: true, + window: true, + properties: { + status: 'Status', + art: 'Art', + }, + }, + [sBahn]: { + geometry: true, + window: true, + properties: { + status: 'Status', + art: 'Art', + }, + }, + }, + coordinateSources: [ + 'plugin/pins/transformedCoordinate', + 'plugin/pins/coordinatesAfterDrag', + ], + customHighlightStyle: { + stroke: { + color: '#FFFF00', + width: 3, + }, + fill: { + color: 'rgb(255, 255, 255, 0)', + }, + }, + }, + layers: [ + { + id: test, + visibility: true, + type: 'background', + name: 'test' + }, + { + id: basemapId, + visibility: true, + type: 'background', + name: 'snowbox.layers.basemap', + }, + { + id: basemapGreyId, + type: 'background', + name: 'snowbox.layers.basemapGrey', + }, + { + id: uBahn, + visibility: true, + type: 'mask', + name: 'snowbox.layers.underground', + }, + { + id: sBahn, + type: 'mask', + name: 'snowbox.layers.rapid', + }, + { + id: hamburgBorder, + visibility: true, + hideInMenu: true, + type: 'mask', + name: 'snowbox.layers.hamburgBorder', + }, + ], + pins: { + // boundaryLayerId: hamburgBorder, + toZoomLevel: 9, + movable: true, + appearOnClick: { + show: true, + atZoomLevel: 6, + }, + style: { + fill: '#ff0019', + }, + }, +} diff --git a/packages/clients/dataportal/src/polar-client.ts b/packages/clients/dataportal/src/polar-client.ts new file mode 100644 index 000000000..71d161c74 --- /dev/null +++ b/packages/clients/dataportal/src/polar-client.ts @@ -0,0 +1,75 @@ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ +import polarCore from '@polar/core' +import { changeLanguage } from 'i18next' +import { addPlugins } from './addPlugins' +import { mapConfiguration } from './mapConfiguration' + +addPlugins(polarCore) + +const createMap = (layerConf) => { + polarCore + .createMap({ + containerId: 'polarstern', + mapConfiguration: { + ...mapConfiguration, + layerConf, + }, + }) + .then( + addStoreSubscriptions( + ['plugin/zoom/zoomLevel', 'vuex-target-zoom'], + ['plugin/featureDistance/length', 'vuex-target-distance'], + ['plugin/featureDistance/unit', 'vuex-target-unit'], + [ + 'plugin/gfi/featureInformation', + 'vuex-target-gfi', + (featureInformation) => JSON.stringify(featureInformation, null, 2), + ], + ['plugin/pins/transformedCoordinate', 'vuex-target-pin-coordinate'], + [ + 'plugin/addressSearch/chosenAddress', + 'vuex-target-address-search-result', + (address) => JSON.stringify(address, null, 2), + ], + [ + 'plugin/export/exportedMap', + null, + (screenshot) => + document + .getElementById('vuex-target-export-result')! + .setAttribute('src', screenshot), + ] + ) + ) +} + +const addStoreSubscriptions = + (...subscriptions) => + (map) => + subscriptions.forEach(([actionName, targetId, callback = (x) => x]) => + map.subscribe(actionName, (value) => + targetId + ? (document.getElementById(targetId)!.innerHTML = callback(value)) + : callback(value) + ) + ) + +polarCore.rawLayerList.initializeLayerList( + // using hamburg's service register as an example + 'https://geodienste.hamburg.de/services-internet.json', + createMap +) + +/* simple language switcher attached for demo purposes; + * language switching is considered a global concern and + * should be handled by the leading application */ +document + .getElementById('language-switcher')! + .addEventListener('change', (event) => { + const target = event.target as HTMLOptionElement + const { value } = target + changeLanguage(value).then(() => { + target[0].innerHTML = value === 'en' ? 'English' : 'Englisch' + target[1].innerHTML = value === 'en' ? 'German' : 'Deutsch' + }) + }) diff --git a/packages/clients/dataportal/tsconfig.json b/packages/clients/dataportal/tsconfig.json new file mode 100644 index 000000000..618c6c3e9 --- /dev/null +++ b/packages/clients/dataportal/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.json" +} diff --git a/packages/clients/dataportal/vite.config.js b/packages/clients/dataportal/vite.config.js new file mode 100644 index 000000000..84e1d7ed1 --- /dev/null +++ b/packages/clients/dataportal/vite.config.js @@ -0,0 +1,5 @@ +import { getClientConfig } from '../../../viteConfigs' + +export default getClientConfig({ + base: '', +}) diff --git a/packages/clients/snowbox/src/addPlugins.ts b/packages/clients/snowbox/src/addPlugins.ts index c98690723..9a362b42c 100644 --- a/packages/clients/snowbox/src/addPlugins.ts +++ b/packages/clients/snowbox/src/addPlugins.ts @@ -4,6 +4,7 @@ import AddressSearch from '@polar/plugin-address-search' import Attributions from '@polar/plugin-attributions' import Draw from '@polar/plugin-draw' import Export from '@polar/plugin-export' +import FeatureDistance from '@polar/plugin-feature-distance' import Fullscreen from '@polar/plugin-fullscreen' import GeoLocation from '@polar/plugin-geo-location' import Gfi from '@polar/plugin-gfi' @@ -39,6 +40,11 @@ export const addPlugins = (core) => { icon: 'fa-pencil', id: 'draw', }, + { + plugin: FeatureDistance({}), + icon: 'fa-pen-ruler', + id: 'featureDistance', + }, { plugin: Zoom({ renderType: 'iconMenu' }), id: 'zoom', diff --git a/packages/plugins/Draw/src/store/createInteractions/createTextInteractions.ts b/packages/plugins/Draw/src/store/createInteractions/createTextInteractions.ts index 736665e4f..e2e9e61ba 100644 --- a/packages/plugins/Draw/src/store/createInteractions/createTextInteractions.ts +++ b/packages/plugins/Draw/src/store/createInteractions/createTextInteractions.ts @@ -26,8 +26,8 @@ export default function ( style: textStyle, }) draw.on('drawend', function (e) { - e.feature.setStyle(textStyle) - e.feature.set('text', textInput) + e.feature.setStyle(textStyle) + e.feature.set('text', textInput) }) // prevent the creation of empty text features drawSource.on('addfeature', (event) => { diff --git a/packages/plugins/FeatureDistance/CHANGELOG.md b/packages/plugins/FeatureDistance/CHANGELOG.md new file mode 100644 index 000000000..e02af2e6b --- /dev/null +++ b/packages/plugins/FeatureDistance/CHANGELOG.md @@ -0,0 +1,9 @@ +# CHANGELOG + +## unpublished + +- Initial release. + +## 1.0.0 + +Initial release. \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/LICENSE b/packages/plugins/FeatureDistance/LICENSE new file mode 100644 index 000000000..c29ce2f83 --- /dev/null +++ b/packages/plugins/FeatureDistance/LICENSE @@ -0,0 +1,287 @@ + EUROPEAN UNION PUBLIC LICENCE v. 1.2 + EUPL © the European Union 2007, 2016 + +This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined +below) which is provided under the terms of this Licence. Any use of the Work, +other than as authorised under this Licence is prohibited (to the extent such +use is covered by a right of the copyright holder of the Work). + +The Work is provided under the terms of this Licence when the Licensor (as +defined below) has placed the following notice immediately following the +copyright notice for the Work: + + Licensed under the EUPL + +or has expressed by any other means his willingness to license under the EUPL. + +1. Definitions + +In this Licence, the following terms have the following meaning: + +- ‘The Licence’: this Licence. + +- ‘The Original Work’: the work or software distributed or communicated by the + Licensor under this Licence, available as Source Code and also as Executable + Code as the case may be. + +- ‘Derivative Works’: the works or software that could be created by the + Licensee, based upon the Original Work or modifications thereof. This Licence + does not define the extent of modification or dependence on the Original Work + required in order to classify a work as a Derivative Work; this extent is + determined by copyright law applicable in the country mentioned in Article 15. + +- ‘The Work’: the Original Work or its Derivative Works. + +- ‘The Source Code’: the human-readable form of the Work which is the most + convenient for people to study and modify. + +- ‘The Executable Code’: any code which has generally been compiled and which is + meant to be interpreted by a computer as a program. + +- ‘The Licensor’: the natural or legal person that distributes or communicates + the Work under the Licence. + +- ‘Contributor(s)’: any natural or legal person who modifies the Work under the + Licence, or otherwise contributes to the creation of a Derivative Work. + +- ‘The Licensee’ or ‘You’: any natural or legal person who makes any usage of + the Work under the terms of the Licence. + +- ‘Distribution’ or ‘Communication’: any act of selling, giving, lending, + renting, distributing, communicating, transmitting, or otherwise making + available, online or offline, copies of the Work or providing access to its + essential functionalities at the disposal of any other natural or legal + person. + +2. Scope of the rights granted by the Licence + +The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, +sublicensable licence to do the following, for the duration of copyright vested +in the Original Work: + +- use the Work in any circumstance and for all usage, +- reproduce the Work, +- modify the Work, and make Derivative Works based upon the Work, +- communicate to the public, including the right to make available or display + the Work or copies thereof to the public and perform publicly, as the case may + be, the Work, +- distribute the Work or copies thereof, +- lend and rent the Work or copies thereof, +- sublicense rights in the Work or copies thereof. + +Those rights can be exercised on any media, supports and formats, whether now +known or later invented, as far as the applicable law permits so. + +In the countries where moral rights apply, the Licensor waives his right to +exercise his moral right to the extent allowed by law in order to make effective +the licence of the economic rights here above listed. + +The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to +any patents held by the Licensor, to the extent necessary to make use of the +rights granted on the Work under this Licence. + +3. Communication of the Source Code + +The Licensor may provide the Work either in its Source Code form, or as +Executable Code. If the Work is provided as Executable Code, the Licensor +provides in addition a machine-readable copy of the Source Code of the Work +along with each copy of the Work that the Licensor distributes or indicates, in +a notice following the copyright notice attached to the Work, a repository where +the Source Code is easily and freely accessible for as long as the Licensor +continues to distribute or communicate the Work. + +4. Limitations on copyright + +Nothing in this Licence is intended to deprive the Licensee of the benefits from +any exception or limitation to the exclusive rights of the rights owners in the +Work, of the exhaustion of those rights or of other applicable limitations +thereto. + +5. Obligations of the Licensee + +The grant of the rights mentioned above is subject to some restrictions and +obligations imposed on the Licensee. Those obligations are the following: + +Attribution right: The Licensee shall keep intact all copyright, patent or +trademarks notices and all notices that refer to the Licence and to the +disclaimer of warranties. The Licensee must include a copy of such notices and a +copy of the Licence with every copy of the Work he/she distributes or +communicates. The Licensee must cause any Derivative Work to carry prominent +notices stating that the Work has been modified and the date of modification. + +Copyleft clause: If the Licensee distributes or communicates copies of the +Original Works or Derivative Works, this Distribution or Communication will be +done under the terms of this Licence or of a later version of this Licence +unless the Original Work is expressly distributed only under this version of the +Licence — for example by communicating ‘EUPL v. 1.2 only’. The Licensee +(becoming Licensor) cannot offer or impose any additional terms or conditions on +the Work or Derivative Work that alter or restrict the terms of the Licence. + +Compatibility clause: If the Licensee Distributes or Communicates Derivative +Works or copies thereof based upon both the Work and another work licensed under +a Compatible Licence, this Distribution or Communication can be done under the +terms of this Compatible Licence. For the sake of this clause, ‘Compatible +Licence’ refers to the licences listed in the appendix attached to this Licence. +Should the Licensee's obligations under the Compatible Licence conflict with +his/her obligations under this Licence, the obligations of the Compatible +Licence shall prevail. + +Provision of Source Code: When distributing or communicating copies of the Work, +the Licensee will provide a machine-readable copy of the Source Code or indicate +a repository where this Source will be easily and freely available for as long +as the Licensee continues to distribute or communicate the Work. + +Legal Protection: This Licence does not grant permission to use the trade names, +trademarks, service marks, or names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the copyright notice. + +6. Chain of Authorship + +The original Licensor warrants that the copyright in the Original Work granted +hereunder is owned by him/her or licensed to him/her and that he/she has the +power and authority to grant the Licence. + +Each Contributor warrants that the copyright in the modifications he/she brings +to the Work are owned by him/her or licensed to him/her and that he/she has the +power and authority to grant the Licence. + +Each time You accept the Licence, the original Licensor and subsequent +Contributors grant You a licence to their contributions to the Work, under the +terms of this Licence. + +7. Disclaimer of Warranty + +The Work is a work in progress, which is continuously improved by numerous +Contributors. It is not a finished work and may therefore contain defects or +‘bugs’ inherent to this type of development. + +For the above reason, the Work is provided under the Licence on an ‘as is’ basis +and without warranties of any kind concerning the Work, including without +limitation merchantability, fitness for a particular purpose, absence of defects +or errors, accuracy, non-infringement of intellectual property rights other than +copyright as stated in Article 6 of this Licence. + +This disclaimer of warranty is an essential part of the Licence and a condition +for the grant of any rights to the Work. + +8. Disclaimer of Liability + +Except in the cases of wilful misconduct or damages directly caused to natural +persons, the Licensor will in no event be liable for any direct or indirect, +material or moral, damages of any kind, arising out of the Licence or of the use +of the Work, including without limitation, damages for loss of goodwill, work +stoppage, computer failure or malfunction, loss of data or any commercial +damage, even if the Licensor has been advised of the possibility of such damage. +However, the Licensor will be liable under statutory product liability laws as +far such laws apply to the Work. + +9. Additional agreements + +While distributing the Work, You may choose to conclude an additional agreement, +defining obligations or services consistent with this Licence. However, if +accepting obligations, You may act only on your own behalf and on your sole +responsibility, not on behalf of the original Licensor or any other Contributor, +and only if You agree to indemnify, defend, and hold each Contributor harmless +for any liability incurred by, or claims asserted against such Contributor by +the fact You have accepted any warranty or additional liability. + +10. Acceptance of the Licence + +The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ +placed under the bottom of a window displaying the text of this Licence or by +affirming consent in any other similar way, in accordance with the rules of +applicable law. Clicking on that icon indicates your clear and irrevocable +acceptance of this Licence and all of its terms and conditions. + +Similarly, you irrevocably accept this Licence and all of its terms and +conditions by exercising any rights granted to You by Article 2 of this Licence, +such as the use of the Work, the creation by You of a Derivative Work or the +Distribution or Communication by You of the Work or copies thereof. + +11. Information to the public + +In case of any Distribution or Communication of the Work by means of electronic +communication by You (for example, by offering to download the Work from a +remote location) the distribution channel or media (for example, a website) must +at least provide to the public the information requested by the applicable law +regarding the Licensor, the Licence and the way it may be accessible, concluded, +stored and reproduced by the Licensee. + +12. Termination of the Licence + +The Licence and the rights granted hereunder will terminate automatically upon +any breach by the Licensee of the terms of the Licence. + +Such a termination will not terminate the licences of any person who has +received the Work from the Licensee under the Licence, provided such persons +remain in full compliance with the Licence. + +13. Miscellaneous + +Without prejudice of Article 9 above, the Licence represents the complete +agreement between the Parties as to the Work. + +If any provision of the Licence is invalid or unenforceable under applicable +law, this will not affect the validity or enforceability of the Licence as a +whole. Such provision will be construed or reformed so as necessary to make it +valid and enforceable. + +The European Commission may publish other linguistic versions or new versions of +this Licence or updated versions of the Appendix, so far this is required and +reasonable, without reducing the scope of the rights granted by the Licence. New +versions of the Licence will be published with a unique version number. + +All linguistic versions of this Licence, approved by the European Commission, +have identical value. Parties can take advantage of the linguistic version of +their choice. + +14. Jurisdiction + +Without prejudice to specific agreement between parties, + +- any litigation resulting from the interpretation of this License, arising + between the European Union institutions, bodies, offices or agencies, as a + Licensor, and any Licensee, will be subject to the jurisdiction of the Court + of Justice of the European Union, as laid down in article 272 of the Treaty on + the Functioning of the European Union, + +- any litigation arising between other parties and resulting from the + interpretation of this License, will be subject to the exclusive jurisdiction + of the competent court where the Licensor resides or conducts its primary + business. + +15. Applicable Law + +Without prejudice to specific agreement between parties, + +- this Licence shall be governed by the law of the European Union Member State + where the Licensor has his seat, resides or has his registered office, + +- this licence shall be governed by Belgian law if the Licensor has no seat, + residence or registered office inside a European Union Member State. + +Appendix + +‘Compatible Licences’ according to Article 5 EUPL are: + +- GNU General Public License (GPL) v. 2, v. 3 +- GNU Affero General Public License (AGPL) v. 3 +- Open Software License (OSL) v. 2.1, v. 3.0 +- Eclipse Public License (EPL) v. 1.0 +- CeCILL v. 2.0, v. 2.1 +- Mozilla Public Licence (MPL) v. 2 +- GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 +- Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for + works other than software +- European Union Public Licence (EUPL) v. 1.1, v. 1.2 +- Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong + Reciprocity (LiLiQ-R+). + +The European Commission may update this Appendix to later versions of the above +licences without producing a new version of the EUPL, as long as they provide +the rights granted in Article 2 of this Licence and protect the covered Source +Code from exclusive appropriation. + +All other changes or additions to this Appendix require the production of a new +EUPL version. \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/README.md b/packages/plugins/FeatureDistance/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/packages/plugins/FeatureDistance/package.json b/packages/plugins/FeatureDistance/package.json new file mode 100644 index 000000000..90a4695c3 --- /dev/null +++ b/packages/plugins/FeatureDistance/package.json @@ -0,0 +1,20 @@ +{ + "name": "@polar/plugin-feature-distance", + "version": "1.0.0", + "description": "Plugin FeatureDistance", + "license": "EUPL-1.2", + "type": "module", + "author": "Dataport AöR ", + "main": "src/index.ts", + "files": [ + "src/**/*", + "CHANGELOG.md" + ], + "peerDependencies": { + "vue": "^2.6.14", + "vuex": "^3.6.2" + }, + "devDependencies": { + "@polar/lib-custom-types": "^1.0.0" + } + } \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/src/components/ColorSlider.vue b/packages/plugins/FeatureDistance/src/components/ColorSlider.vue new file mode 100644 index 000000000..00c422bcb --- /dev/null +++ b/packages/plugins/FeatureDistance/src/components/ColorSlider.vue @@ -0,0 +1,110 @@ + + + diff --git a/packages/plugins/FeatureDistance/src/components/ExpansionPanel.vue b/packages/plugins/FeatureDistance/src/components/ExpansionPanel.vue new file mode 100644 index 000000000..b411468e6 --- /dev/null +++ b/packages/plugins/FeatureDistance/src/components/ExpansionPanel.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/packages/plugins/FeatureDistance/src/components/FeatureDistance.vue b/packages/plugins/FeatureDistance/src/components/FeatureDistance.vue new file mode 100644 index 000000000..ca3701cc0 --- /dev/null +++ b/packages/plugins/FeatureDistance/src/components/FeatureDistance.vue @@ -0,0 +1,163 @@ + + + + + diff --git a/packages/plugins/FeatureDistance/src/components/index.ts b/packages/plugins/FeatureDistance/src/components/index.ts new file mode 100644 index 000000000..1eca13c86 --- /dev/null +++ b/packages/plugins/FeatureDistance/src/components/index.ts @@ -0,0 +1 @@ +export { default as FeatureDistance } from './FeatureDistance.vue' \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/src/index.ts b/packages/plugins/FeatureDistance/src/index.ts new file mode 100644 index 000000000..da4764933 --- /dev/null +++ b/packages/plugins/FeatureDistance/src/index.ts @@ -0,0 +1,14 @@ +import Vue from 'vue' +import { FeatureDistance } from './components' +import language from './language' +import { makeStoreModule } from './store' + +// NOTE: Currently no options are specified here, variable is kept for integrity until options are needed +export default (options: {}) => (instance: Vue) => + instance.$store.dispatch('addComponent', { + name: 'featureDistance', + plugin: FeatureDistance, + language, + storeModule: makeStoreModule(), + options, + }) \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/src/language.ts b/packages/plugins/FeatureDistance/src/language.ts new file mode 100644 index 000000000..5d8b1c7cf --- /dev/null +++ b/packages/plugins/FeatureDistance/src/language.ts @@ -0,0 +1,62 @@ +import { LanguageOption } from '@polar/lib-custom-types' + +const language: LanguageOption[] = [ + { + type: 'de', + resources: { + plugins: { + featureDistance: { + mode: { + select: 'Auswählen', + draw: 'Zeichnen', + edit: 'Bearbeiten', + delete: 'Löschen', + }, + title: { + mode: 'Modus', + unit: 'Einheit', + color: 'Farbe', + }, + label: { + line: 'Linie', + text: 'Text', + buttons: { + deletaAll: 'Alle löschen', + setColor: 'Setze {{ title }}-Farbe' + }, + }, + }, + }, + }, + }, + { + type: 'en', + resources: { + plugins: { + featureDistance: { + mode: { + select: 'Select', + draw: 'Draw', + edit: 'Edit', + delete: 'Delete', + }, + title: { + mode: 'Mode', + unit: 'Unit', + color: 'Color', + }, + label: { + line: 'Line', + text: 'Text', + buttons: { + deletaAll: 'Delete all', + setColor: 'Set {{ title }}-Color' + }, + }, + }, + }, + }, + }, + ] + +export default language \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/src/store/actions.ts b/packages/plugins/FeatureDistance/src/store/actions.ts new file mode 100644 index 000000000..8e732561a --- /dev/null +++ b/packages/plugins/FeatureDistance/src/store/actions.ts @@ -0,0 +1,56 @@ +import { PolarActionTree } from '@polar/lib-custom-types' +import { FeatureDistanceGetters, FeatureDistanceState, Mode, Unit, Color } from '../types' +import VectorSource from 'ol/source/Vector' +import VectorLayer from 'ol/layer/Vector'; +import { Interaction } from 'ol/interaction' +import createInteractions from './createInteractions' +import createDeleteInteraction from './createInteractions/createDeleteInteraction' +import createStyleFunc from './createStyles' +import Feature from 'ol/Feature'; + +export const makeActions = () => { + let interactions: Interaction[] = [] + const drawSource = new VectorSource() + let drawLayer = new VectorLayer({source: drawSource}) + + const actions: PolarActionTree = { + createDeleteInteraction, + createInteractions, + createStyleFunc, + setupModule({dispatch, rootGetters: { map }}) { + map.addLayer(drawLayer); + dispatch('updateInteractions'); + }, + setLineColor({ commit, dispatch }, color: Color) { + commit('setColor', color); + dispatch('updateInteractions'); + }, + setTextColor({ commit, dispatch }, color: Color) { + commit('setTextColor', color); + dispatch('updateInteractions'); + }, + setMode({ commit, dispatch }, mode: Mode) { + commit('setMode', mode); + dispatch('updateInteractions'); + }, + setUnit({ commit, dispatch }, unit: Unit) { + commit('setUnit', unit); + dispatch('updateInteractions'); + }, + setLineFeature({ commit }, feature: Feature | null) { + commit('setLineFeature', feature); + commit('setLine'); + commit('setLength'); + }, + clearLayer() { + drawSource.clear(); + }, + async updateInteractions({ dispatch, rootGetters: { map }, }) { + interactions.forEach((interaction) => map.removeInteraction(interaction)) + interactions = await dispatch('createInteractions', drawLayer ) + interactions.forEach((interaction) => { map.addInteraction(interaction) }); + }, + } + return actions; +} + \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/src/store/createInteractions/createDeleteInteraction.ts b/packages/plugins/FeatureDistance/src/store/createInteractions/createDeleteInteraction.ts new file mode 100644 index 000000000..2522971fc --- /dev/null +++ b/packages/plugins/FeatureDistance/src/store/createInteractions/createDeleteInteraction.ts @@ -0,0 +1,62 @@ +import Interaction from 'ol/interaction/Interaction' +import { Modify, Snap, Select} from 'ol/interaction' +import {never, singleClick} from 'ol/events/condition' +import { LineString, Point } from 'ol/geom' +import { Feature } from 'ol' +import { PolarActionContext } from '@polar/lib-custom-types' +import { FeatureDistanceGetters, FeatureDistanceState } from '../../types' + +export default function ( + { dispatch, commit, getters: { lineFeature } }: PolarActionContext, + {drawSource, drawLayer}) + : Interaction[] { + + function removeFeature(feature: Feature) { + const line = feature.getGeometry() as LineString; + if (line.getCoordinates().length < 2) { + drawSource.removeFeature(feature); + dispatch("setLineFeature", null); + } + else if (lineFeature === feature) { commit('setLength') } + else { dispatch("setLineFeature", feature) } + } + + const modify = new Modify({ + source: drawSource, + insertVertexCondition: never, + deleteCondition: singleClick + }) + + const select = new Select({ layers: [drawLayer] }) + const snap = new Snap({source: drawSource}) + + select.on('select', ({selected, mapBrowserEvent}) => { + if (selected.length > 0) { + const feature: Feature = selected[0]; + const line = feature.getGeometry() as LineString; + const point = new Point(mapBrowserEvent.coordinate); + + const segment = line.forEachSegment((c1, c2) => { + const s = new LineString([c1, c2]); + if (s.intersectsExtent(point.getExtent())) { + return [c1.toString(), c2.toString()] + } + }) as String[] | null + + if (segment as String[]) { + const coords = line.getCoordinates().filter((c) => !segment?.includes(c.toString())) + line.setCoordinates(coords); + removeFeature(feature); + select.getFeatures().clear(); + } + } + }) + + modify.on("modifyend", ({features}) => { + if (features.getLength() === 1) { + removeFeature(features.item(0) as Feature); + } + }) + + return [select, modify, snap]; +} diff --git a/packages/plugins/FeatureDistance/src/store/createInteractions/index.ts b/packages/plugins/FeatureDistance/src/store/createInteractions/index.ts new file mode 100644 index 000000000..0a3891dfc --- /dev/null +++ b/packages/plugins/FeatureDistance/src/store/createInteractions/index.ts @@ -0,0 +1,66 @@ +import Interaction from 'ol/interaction/Interaction' +import { PolarActionContext } from '@polar/lib-custom-types' +import { FeatureDistanceGetters, FeatureDistanceState } from '../../types' +import { Select, Modify, Draw} from 'ol/interaction' +import {never } from 'ol/events/condition' +import { Style } from 'ol/style' +import { Collection } from 'ol' +import VectorLayer from 'ol/layer/Vector' +import VectorSource from 'ol/source/Vector' + +export default async function ( + { + dispatch, + getters: { mode, lineFeature } + } : PolarActionContext, + drawLayer: VectorLayer +): Promise { + let interactions: Interaction[] = []; + let styleFunc = await dispatch('createStyleFunc'); + const specialStyle = await dispatch('createStyleFunc', mode); + const drawSource = drawLayer.getSource() as VectorSource; + + if (mode === 'draw') { + const draw = new Draw({ + style: specialStyle, + type: 'LineString', + source: drawSource + }); + + draw.on("drawend", ({feature}) => { dispatch("setLineFeature", feature) }) + + interactions.push(draw); + } + else if (drawSource.getFeatures().length > 0) { + if (mode === 'edit') { + interactions.push( + new Modify({ + source: drawSource, + insertVertexCondition: never, + deleteCondition: never, + style: new Style() + }) + ); + styleFunc = specialStyle; + } + else if (mode === 'delete') { + interactions = await dispatch('createDeleteInteraction', {drawSource, drawLayer}); + styleFunc = specialStyle; + } + else { + const collection = lineFeature ? new Collection([lineFeature]) : undefined; + const select = new Select({ + layers: [drawLayer], + features: collection, + style: specialStyle + }); + + select.getFeatures().on("add", ({element}) => dispatch("setLineFeature", element)); + select.getFeatures().on("remove", () => dispatch("setLineFeature", null)); + + interactions.push(select); + } + } + drawLayer.setStyle(styleFunc); + return interactions; +} diff --git a/packages/plugins/FeatureDistance/src/store/createStyles/createDeleteStyle.ts b/packages/plugins/FeatureDistance/src/store/createStyles/createDeleteStyle.ts new file mode 100644 index 000000000..a6c2398fa --- /dev/null +++ b/packages/plugins/FeatureDistance/src/store/createStyles/createDeleteStyle.ts @@ -0,0 +1,36 @@ +import { Fill, Stroke, Style, Text, Circle } from 'ol/style' +import { Color } from '../../types' + +export default function (line: Color, text: Color): Style[] { + return [ + new Style({ + image: new Circle({ + radius: 3, + stroke: new Stroke({ + color: [line.r, line.g, line.b, 1.0], + width: 1 + }), + fill: new Fill({ + color: [line.r, line.g, line.b, 0.4] + }) + }) + }), + new Style({ + stroke: new Stroke({ + color: [line.r, line.g, line.b, 1.0], + width: 3 + }), + text: new Text({ + font: 'bold 10px cursive', + placement: 'line', + fill: new Fill({ + color: [text.r, text.g, text.b, 1.0] + }), + stroke: new Stroke({ + color: [line.r, line.g, line.b, 1.0] + }), + offsetY: -5, + }) + }) + ] +} \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/src/store/createStyles/createDrawStyle.ts b/packages/plugins/FeatureDistance/src/store/createStyles/createDrawStyle.ts new file mode 100644 index 000000000..83e59ec9c --- /dev/null +++ b/packages/plugins/FeatureDistance/src/store/createStyles/createDrawStyle.ts @@ -0,0 +1,36 @@ +import { Fill, Stroke, Style, Text, Circle } from 'ol/style' +import { Color } from '../../types' + +export default function (line: Color, text: Color): Style[] { + return [ + new Style({ + image: new Circle({ + radius: 4, + stroke: new Stroke({ + color: [line.r, line.g, line.b, 0.7], + width: 1 + }), + fill: new Fill({ + color: [line.r, line.g, line.b, 0.4] + }) + }), + }), + new Style({ + stroke: new Stroke({ + color: [line.r, line.g, line.b, 0.7], + width: 3.5 + }), + text: new Text({ + font: 'bold 10px cursive', + placement: 'line', + fill: new Fill({ + color: [text.r, text.g, text.b, 0.7] + }), + stroke: new Stroke({ + color: [line.r, line.g, line.b, 0.7] + }), + offsetY: -5, + }) + }) + ] +} \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/src/store/createStyles/createModifyStyle.ts b/packages/plugins/FeatureDistance/src/store/createStyles/createModifyStyle.ts new file mode 100644 index 000000000..dd9a5ad6a --- /dev/null +++ b/packages/plugins/FeatureDistance/src/store/createStyles/createModifyStyle.ts @@ -0,0 +1,36 @@ +import { Fill, Stroke, Style, Text, Circle } from 'ol/style' +import { Color } from '../../types' + +export default function (line: Color, text: Color): Style[] { + return [ + new Style({ + image: new Circle({ + radius: 7, + stroke: new Stroke({ + color: [line.r, line.g, line.b, 1.0], + width: 1 + }), + fill: new Fill({ + color: [line.r, line.g, line.b, 0.4] + }) + }), + }), + new Style({ + stroke: new Stroke({ + color: [line.r, line.g, line.b, 1.0], + width: 3 + }), + text: new Text({ + font: 'bold 10px cursive', + placement: 'line', + fill: new Fill({ + color: [text.r, text.b, text.g, 1.0] + }), + stroke: new Stroke({ + color: [line.r, line.g, line.b, 1.0] + }), + offsetY: -5, + }) + }) + ] +} \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/src/store/createStyles/createSelectStyle.ts b/packages/plugins/FeatureDistance/src/store/createStyles/createSelectStyle.ts new file mode 100644 index 000000000..2cb8653ac --- /dev/null +++ b/packages/plugins/FeatureDistance/src/store/createStyles/createSelectStyle.ts @@ -0,0 +1,36 @@ +import { Fill, Stroke, Style, Text, Circle } from 'ol/style' +import { Color } from '../../types' + +export default function (line: Color, text: Color): Style[] { + return [ + new Style({ + image: new Circle({ + radius: 5, + stroke: new Stroke({ + color: [line.r, line.g, line.b, 1.0], + width: 1 + }), + fill: new Fill({ + color: [line.r, line.g, line.b, 0.4] + }) + }), + }), + new Style({ + stroke: new Stroke({ + color: [line.r, line.g, line.b, 1.0], + width: 4 + }), + text: new Text({ + font: 'bold 10px cursive', + placement: 'line', + fill: new Fill({ + color: [text.r, text.g, text.b, 1.0] + }), + stroke: new Stroke({ + color: [line.r, line.g, line.b, 1.0] + }), + offsetY: -5, + }) + }) + ] +} \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/src/store/createStyles/index.ts b/packages/plugins/FeatureDistance/src/store/createStyles/index.ts new file mode 100644 index 000000000..8cf561c5a --- /dev/null +++ b/packages/plugins/FeatureDistance/src/store/createStyles/index.ts @@ -0,0 +1,95 @@ +import { PolarActionContext } from '@polar/lib-custom-types' +import { FeatureDistanceGetters, FeatureDistanceState, Mode } from '../../types' +import { Text, Fill, Stroke, Circle, Style } from 'ol/style' +import { LineString, Point } from 'ol/geom' +import createDrawStyle from './createDrawStyle' +import createDeleteStyle from './createDeleteStyle' +import createModifyStyle from './createModifyStyle' +import createSelectStyle from './createSelectStyle' + + +export default function ( + { commit, getters }: PolarActionContext, + styleType: Mode | undefined +): Function { + const {r, g, b} = getters.color; + const textColor = getters.textColor; + const pointStyle = new Style({ + image: new Circle({ + radius: 3, + stroke: new Stroke({ + color: [r, g, b, 1.0], + width: 1 + }), + fill: new Fill({ + color: [r, g, b, 0.4] + }) + }), + }); + + const lineStyle = new Style({ + stroke: new Stroke({ + color: [r, g, b, 0.8], + width: 3 + }), + text: new Text({ + font: 'bold 10px cursive', + placement: 'line', + fill: new Fill({ + color: [textColor.r, textColor.g, textColor.b, 0.8] + }), + stroke: new Stroke({ + color: [r, g, b, 0.8] + }), + offsetY: -5, + }) + }); + let style: Style[] = [pointStyle, lineStyle]; + + if (styleType === 'draw') { + style = createDrawStyle(getters.color, textColor); + } else if (styleType === 'edit') { + style = createModifyStyle(getters.color, textColor); + } else if (styleType === 'delete') { + style = createDeleteStyle(getters.color, textColor); + } else if (styleType === 'select') { + style = createSelectStyle(getters.color, textColor); + } + + const pointstyle = style[0]; + const linestyle = style[1]; + + const styleFunc = function (feature) { + const styles: Style[] = []; + if (feature.getGeometry().getType() === 'Point') { + const dot = feature.getGeometry() as Point; + const dotStyle = pointstyle.clone(); + dotStyle.setGeometry(dot); + styles.push(dotStyle); + } + else { + const line = feature.getGeometry() as LineString; + line.forEachSegment((c1, c2) => { + const segment = new LineString([c1, c2]); + const length = getters.getRoundedLength(segment); + const text = length + getters.unit; + const segmentstyle = linestyle.clone(); + segmentstyle.getText().setText(text); + segmentstyle.setGeometry(segment); + const point = new Point(c1); + const c1style = pointstyle.clone(); + c1style.setGeometry(point); + styles.splice(styles.length, 0, segmentstyle, c1style) + if (c2.toString() === line.getLastCoordinate().toString()) { + const endpoint = new Point(c2); + const c2style = pointstyle.clone(); + c2style.setGeometry(endpoint); + styles.push(c2style); + } + }) + line.set("length", getters.getRoundedLength(line)) + if (feature === getters.lineFeature) { commit("setLength") }} + return styles; + } + return styleFunc +} diff --git a/packages/plugins/FeatureDistance/src/store/index.ts b/packages/plugins/FeatureDistance/src/store/index.ts new file mode 100644 index 000000000..eb02aeaf9 --- /dev/null +++ b/packages/plugins/FeatureDistance/src/store/index.ts @@ -0,0 +1,60 @@ +import { PolarModule } from '@polar/lib-custom-types' +import { generateSimpleGetters, generateSimpleMutations } from '@repositoryname/vuex-generators' +import { FeatureDistanceGetters, FeatureDistanceState } from '../types' +import { makeActions } from './actions' + +import { LineString } from 'ol/geom'; +import { getLength } from 'ol/sphere'; + +const getInitialState = (): FeatureDistanceState => ({ + mode: 'select', + unit: 'm', + lineFeature: null, + line: null, + length: null, + color: {r: 0, g: 204, b: 204}, + textColor: {r: 0, g: 0, b: 0}, + active: true +}) + +export const makeStoreModule = () => { + const storeModule: PolarModule = { + namespaced: true, + state: getInitialState(), + actions: makeActions(), + getters: { + ...generateSimpleGetters(getInitialState()), + selectableModes() { + return { + select: 'common:plugins.featureDistance.mode.select', + draw: 'common:plugins.featureDistance.mode.draw', + edit: 'common:plugins.featureDistance.mode.edit', + delete: 'common:plugins.featureDistance.mode.delete', + } + }, + selectableUnits() { + return { + m: 'm', + km: 'km' + } + }, + getRoundedLength: ({ unit }) => (geometry: LineString) => { + let factor = 1; + if (unit === 'km') { + factor = 1000; + } + return Math.round((getLength(geometry) / factor) * 100) / 100; + }, + }, + mutations: {...generateSimpleMutations(getInitialState()), + setLine: (state) => { + state.line = state.lineFeature ? state.lineFeature.getGeometry() as LineString : null; + }, + setLength: (state) => { + state.length = state.line?.get("length") ? state.line?.get("length") : null; + }, + }, + } + + return storeModule +} \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/src/types.ts b/packages/plugins/FeatureDistance/src/types.ts new file mode 100644 index 000000000..645bb8ada --- /dev/null +++ b/packages/plugins/FeatureDistance/src/types.ts @@ -0,0 +1,35 @@ +import { Feature } from 'ol' +import LineString from 'ol/geom/LineString' + +export type Color = { + r: number, + g: number, + b: number +} + +export type Mode = 'select' | 'draw' | 'edit' | 'delete' + +export type Unit = 'm' | 'km' + +export interface FeatureDistanceState { + mode: Mode, + unit: Unit, + lineFeature: Feature | null, + line: LineString | null, + length: Number | null + color: Color, + textColor: Color, + active: boolean +} + + +export interface FeatureDistanceGetters extends FeatureDistanceState { + getRoundedLength: Function, + selectableModes: Mode[], + selectableUnits: Unit[] +} + + + + + \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/tsconfig.json b/packages/plugins/FeatureDistance/tsconfig.json new file mode 100644 index 000000000..b027bb456 --- /dev/null +++ b/packages/plugins/FeatureDistance/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.json" +} \ No newline at end of file diff --git a/packages/plugins/FeatureDistance/vite.config.js b/packages/plugins/FeatureDistance/vite.config.js new file mode 100644 index 000000000..97ec0fb47 --- /dev/null +++ b/packages/plugins/FeatureDistance/vite.config.js @@ -0,0 +1,3 @@ +import { getCodeConfig } from '../../../viteConfigs' + +export default getCodeConfig() \ No newline at end of file diff --git a/packages/plugins/IconMenu/src/language.ts b/packages/plugins/IconMenu/src/language.ts index ab05cd28d..738c25294 100644 --- a/packages/plugins/IconMenu/src/language.ts +++ b/packages/plugins/IconMenu/src/language.ts @@ -10,6 +10,7 @@ const language: LanguageOption[] = [ hints: { attributions: 'Quellennachweis', draw: 'Zeichenwerkzeuge', + featureDistance: 'Entfernung messen', filter: 'Filter', layerChooser: 'Kartenauswahl', gfi: 'Objektliste', @@ -27,6 +28,7 @@ const language: LanguageOption[] = [ hints: { attributions: 'Attributions', draw: 'Draw tools', + featureDistance: 'Measure distance', filter: 'Filter', layerChooser: 'Choose map', gfi: 'Feature list', From 5fabc3ab5eb699f2ecbeea3004dc75294bc024b4 Mon Sep 17 00:00:00 2001 From: Lillian Wiegand Date: Thu, 11 Apr 2024 14:31:48 +0200 Subject: [PATCH 002/102] Added Area --- .../clients/dataportal/src/polar-client.ts | 4 +- .../src/components/ColorSlider.vue | 2 +- .../src/components/FeatureDistance.vue | 27 ++++ .../plugins/FeatureDistance/src/language.ts | 4 + .../FeatureDistance/src/store/actions.ts | 15 ++- .../createDeleteInteraction.ts | 53 +++++--- .../src/store/createInteractions/index.ts | 29 +++-- .../store/createStyles/createDeleteStyle.ts | 36 ------ .../src/store/createStyles/createDrawStyle.ts | 36 ------ .../store/createStyles/createModifyStyle.ts | 36 ------ .../store/createStyles/createSelectStyle.ts | 36 ------ .../src/store/createStyles/createStyle.ts | 58 +++++++++ .../src/store/createStyles/index.ts | 121 +++++++----------- .../FeatureDistance/src/store/index.ts | 49 +++++-- packages/plugins/FeatureDistance/src/types.ts | 22 +++- 15 files changed, 253 insertions(+), 275 deletions(-) delete mode 100644 packages/plugins/FeatureDistance/src/store/createStyles/createDeleteStyle.ts delete mode 100644 packages/plugins/FeatureDistance/src/store/createStyles/createDrawStyle.ts delete mode 100644 packages/plugins/FeatureDistance/src/store/createStyles/createModifyStyle.ts delete mode 100644 packages/plugins/FeatureDistance/src/store/createStyles/createSelectStyle.ts create mode 100644 packages/plugins/FeatureDistance/src/store/createStyles/createStyle.ts diff --git a/packages/clients/dataportal/src/polar-client.ts b/packages/clients/dataportal/src/polar-client.ts index 71d161c74..3d712d5f3 100644 --- a/packages/clients/dataportal/src/polar-client.ts +++ b/packages/clients/dataportal/src/polar-client.ts @@ -18,8 +18,8 @@ const createMap = (layerConf) => { .then( addStoreSubscriptions( ['plugin/zoom/zoomLevel', 'vuex-target-zoom'], - ['plugin/featureDistance/length', 'vuex-target-distance'], - ['plugin/featureDistance/unit', 'vuex-target-unit'], + ['plugin/featureDistance/measure', 'vuex-target-distance'], + ['plugin/featureDistance/selectedUnit', 'vuex-target-unit'], [ 'plugin/gfi/featureInformation', 'vuex-target-gfi', diff --git a/packages/plugins/FeatureDistance/src/components/ColorSlider.vue b/packages/plugins/FeatureDistance/src/components/ColorSlider.vue index 00c422bcb..198ba0037 100644 --- a/packages/plugins/FeatureDistance/src/components/ColorSlider.vue +++ b/packages/plugins/FeatureDistance/src/components/ColorSlider.vue @@ -1,6 +1,6 @@