umap-project 1.3.7__py3-none-any.whl → 1.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of umap-project might be problematic. Click here for more details.
- umap/__init__.py +1 -1
- umap/locale/am_ET/LC_MESSAGES/django.mo +0 -0
- umap/locale/am_ET/LC_MESSAGES/django.po +79 -30
- umap/locale/ar/LC_MESSAGES/django.mo +0 -0
- umap/locale/ar/LC_MESSAGES/django.po +166 -96
- umap/locale/bg/LC_MESSAGES/django.mo +0 -0
- umap/locale/bg/LC_MESSAGES/django.po +79 -30
- umap/locale/br/LC_MESSAGES/django.mo +0 -0
- umap/locale/br/LC_MESSAGES/django.po +460 -0
- umap/locale/ca/LC_MESSAGES/django.mo +0 -0
- umap/locale/ca/LC_MESSAGES/django.po +95 -45
- umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
- umap/locale/cs_CZ/LC_MESSAGES/django.po +80 -31
- umap/locale/da/LC_MESSAGES/django.mo +0 -0
- umap/locale/da/LC_MESSAGES/django.po +80 -31
- umap/locale/de/LC_MESSAGES/django.mo +0 -0
- umap/locale/de/LC_MESSAGES/django.po +80 -31
- umap/locale/el/LC_MESSAGES/django.mo +0 -0
- umap/locale/el/LC_MESSAGES/django.po +87 -38
- umap/locale/en/LC_MESSAGES/django.po +75 -26
- umap/locale/es/LC_MESSAGES/django.mo +0 -0
- umap/locale/es/LC_MESSAGES/django.po +80 -31
- umap/locale/et/LC_MESSAGES/django.mo +0 -0
- umap/locale/et/LC_MESSAGES/django.po +80 -31
- umap/locale/eu/LC_MESSAGES/django.mo +0 -0
- umap/locale/eu/LC_MESSAGES/django.po +457 -0
- umap/locale/fa_IR/LC_MESSAGES/django.mo +0 -0
- umap/locale/fa_IR/LC_MESSAGES/django.po +80 -31
- umap/locale/fi/LC_MESSAGES/django.mo +0 -0
- umap/locale/fi/LC_MESSAGES/django.po +79 -30
- umap/locale/fr/LC_MESSAGES/django.mo +0 -0
- umap/locale/fr/LC_MESSAGES/django.po +82 -33
- umap/locale/gl/LC_MESSAGES/django.mo +0 -0
- umap/locale/gl/LC_MESSAGES/django.po +80 -31
- umap/locale/he/LC_MESSAGES/django.mo +0 -0
- umap/locale/he/LC_MESSAGES/django.po +80 -31
- umap/locale/hr/LC_MESSAGES/django.mo +0 -0
- umap/locale/hr/LC_MESSAGES/django.po +77 -28
- umap/locale/hu/LC_MESSAGES/django.mo +0 -0
- umap/locale/hu/LC_MESSAGES/django.po +80 -31
- umap/locale/is/LC_MESSAGES/django.mo +0 -0
- umap/locale/is/LC_MESSAGES/django.po +80 -31
- umap/locale/it/LC_MESSAGES/django.mo +0 -0
- umap/locale/it/LC_MESSAGES/django.po +80 -31
- umap/locale/ja/LC_MESSAGES/django.mo +0 -0
- umap/locale/ja/LC_MESSAGES/django.po +80 -31
- umap/locale/ko/LC_MESSAGES/django.mo +0 -0
- umap/locale/ko/LC_MESSAGES/django.po +80 -31
- umap/locale/lt/LC_MESSAGES/django.mo +0 -0
- umap/locale/lt/LC_MESSAGES/django.po +79 -30
- umap/locale/ms/LC_MESSAGES/django.mo +0 -0
- umap/locale/ms/LC_MESSAGES/django.po +85 -36
- umap/locale/nl/LC_MESSAGES/django.mo +0 -0
- umap/locale/nl/LC_MESSAGES/django.po +80 -31
- umap/locale/pl/LC_MESSAGES/django.mo +0 -0
- umap/locale/pl/LC_MESSAGES/django.po +80 -31
- umap/locale/pt/LC_MESSAGES/django.mo +0 -0
- umap/locale/pt/LC_MESSAGES/django.po +80 -31
- umap/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- umap/locale/pt_BR/LC_MESSAGES/django.po +80 -31
- umap/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- umap/locale/pt_PT/LC_MESSAGES/django.po +80 -31
- umap/locale/ru/LC_MESSAGES/django.mo +0 -0
- umap/locale/ru/LC_MESSAGES/django.po +80 -31
- umap/locale/si/LC_MESSAGES/django.mo +0 -0
- umap/locale/si/LC_MESSAGES/django.po +456 -0
- umap/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- umap/locale/sk_SK/LC_MESSAGES/django.po +79 -30
- umap/locale/sl/LC_MESSAGES/django.mo +0 -0
- umap/locale/sl/LC_MESSAGES/django.po +79 -30
- umap/locale/sr/LC_MESSAGES/django.mo +0 -0
- umap/locale/sr/LC_MESSAGES/django.po +80 -31
- umap/locale/sv/LC_MESSAGES/django.mo +0 -0
- umap/locale/sv/LC_MESSAGES/django.po +80 -31
- umap/locale/th_TH/LC_MESSAGES/django.mo +0 -0
- umap/locale/th_TH/LC_MESSAGES/django.po +80 -31
- umap/locale/tr/LC_MESSAGES/django.mo +0 -0
- umap/locale/tr/LC_MESSAGES/django.po +80 -31
- umap/locale/uk_UA/LC_MESSAGES/django.mo +0 -0
- umap/locale/uk_UA/LC_MESSAGES/django.po +80 -31
- umap/locale/vi/LC_MESSAGES/django.mo +0 -0
- umap/locale/vi/LC_MESSAGES/django.po +79 -30
- umap/locale/zh/LC_MESSAGES/django.mo +0 -0
- umap/locale/zh/LC_MESSAGES/django.po +79 -30
- umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
- umap/locale/zh_TW/LC_MESSAGES/django.po +94 -45
- umap/models.py +7 -7
- umap/settings/base.py +3 -1
- umap/static/umap/content.css +23 -0
- umap/static/umap/img/16-white.svg +6 -4
- umap/static/umap/img/16.svg +5 -3
- umap/static/umap/img/source/16-white.svg +7 -5
- umap/static/umap/img/source/16.svg +6 -4
- umap/static/umap/js/umap.controls.js +55 -52
- umap/static/umap/js/umap.features.js +14 -0
- umap/static/umap/js/umap.js +6 -7
- umap/static/umap/js/umap.layer.js +2 -2
- umap/static/umap/js/umap.permissions.js +3 -3
- umap/static/umap/js/umap.ui.js +1 -1
- umap/static/umap/locale/br.js +404 -0
- umap/static/umap/locale/br.json +402 -0
- umap/static/umap/locale/{si_LK.js → eu.js} +18 -18
- umap/static/umap/locale/{si_LK.json → eu.json} +16 -16
- umap/static/umap/locale/ms.js +5 -5
- umap/static/umap/locale/ms.json +5 -5
- umap/static/umap/locale/si.js +404 -0
- umap/static/umap/locale/si.json +402 -0
- umap/static/umap/locale/zh_TW.js +35 -35
- umap/static/umap/locale/zh_TW.json +35 -35
- umap/static/umap/map.css +6 -6
- umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +6 -5
- umap/static/umap/vendors/leaflet/leaflet-src.esm.js +1964 -1323
- umap/static/umap/vendors/leaflet/leaflet-src.esm.js.map +1 -1
- umap/static/umap/vendors/leaflet/leaflet-src.js +14478 -13836
- umap/static/umap/vendors/leaflet/leaflet-src.js.map +1 -1
- umap/static/umap/vendors/leaflet/leaflet.css +70 -44
- umap/static/umap/vendors/leaflet/leaflet.js +4 -3
- umap/static/umap/vendors/leaflet/leaflet.js.map +1 -1
- umap/templates/umap/login_popup_end.html +1 -1
- umap/templates/umap/map_table.html +41 -0
- umap/templates/umap/navigation.html +1 -1
- umap/templates/umap/search.html +1 -1
- umap/templates/umap/search_bar.html +5 -3
- umap/templates/umap/user_dashboard.html +23 -0
- umap/tests/test_views.py +21 -0
- umap/urls.py +5 -0
- umap/views.py +55 -42
- {umap_project-1.3.7.dist-info → umap_project-1.4.1.dist-info}/METADATA +1 -1
- {umap_project-1.3.7.dist-info → umap_project-1.4.1.dist-info}/RECORD +132 -122
- umap/locale/si_LK/LC_MESSAGES/django.mo +0 -0
- umap/locale/si_LK/LC_MESSAGES/django.po +0 -376
- {umap_project-1.3.7.dist-info → umap_project-1.4.1.dist-info}/WHEEL +0 -0
- {umap_project-1.3.7.dist-info → umap_project-1.4.1.dist-info}/entry_points.txt +0 -0
- {umap_project-1.3.7.dist-info → umap_project-1.4.1.dist-info}/licenses/LICENSE +0 -0
umap/models.py
CHANGED
|
@@ -131,15 +131,15 @@ class Map(NamedModel):
|
|
|
131
131
|
PRIVATE = 3
|
|
132
132
|
BLOCKED = 9
|
|
133
133
|
EDIT_STATUS = (
|
|
134
|
-
(ANONYMOUS, _("Everyone
|
|
135
|
-
(EDITORS, _("
|
|
136
|
-
(OWNER, _("
|
|
134
|
+
(ANONYMOUS, _("Everyone")),
|
|
135
|
+
(EDITORS, _("Editors only")),
|
|
136
|
+
(OWNER, _("Owner only")),
|
|
137
137
|
)
|
|
138
138
|
SHARE_STATUS = (
|
|
139
|
-
(PUBLIC, _("
|
|
140
|
-
(OPEN, _("
|
|
141
|
-
(PRIVATE, _("
|
|
142
|
-
(BLOCKED, _("
|
|
139
|
+
(PUBLIC, _("Everyone (public)")),
|
|
140
|
+
(OPEN, _("Anyone with link")),
|
|
141
|
+
(PRIVATE, _("Editors only")),
|
|
142
|
+
(BLOCKED, _("Blocked")),
|
|
143
143
|
)
|
|
144
144
|
slug = models.SlugField(db_index=True)
|
|
145
145
|
description = models.TextField(blank=True, null=True, verbose_name=_("description"))
|
umap/settings/base.py
CHANGED
|
@@ -59,6 +59,7 @@ LANGUAGES = (
|
|
|
59
59
|
('ar', 'Arabic'),
|
|
60
60
|
('ast', 'Asturian'),
|
|
61
61
|
('bg', 'Bulgarian'),
|
|
62
|
+
('br', 'Breton'),
|
|
62
63
|
('ca', 'Catalan'),
|
|
63
64
|
('cs-cz', 'Czech'),
|
|
64
65
|
('da', 'Danish'),
|
|
@@ -67,6 +68,7 @@ LANGUAGES = (
|
|
|
67
68
|
('en', 'English'),
|
|
68
69
|
('es', 'Spanish'),
|
|
69
70
|
('et', 'Estonian'),
|
|
71
|
+
('eu', 'Basque'),
|
|
70
72
|
('fa-ir', 'Persian (Iran)'),
|
|
71
73
|
('fi', 'Finnish'),
|
|
72
74
|
('fr', 'French'),
|
|
@@ -89,7 +91,7 @@ LANGUAGES = (
|
|
|
89
91
|
('pt-pt', 'Portuguese (Portugal)'),
|
|
90
92
|
('ro', 'Romanian'),
|
|
91
93
|
('ru', 'Russian'),
|
|
92
|
-
('si
|
|
94
|
+
('si', 'Sinhala'),
|
|
93
95
|
('sk-sk', 'Slovak'),
|
|
94
96
|
('sl', 'Slovenian'),
|
|
95
97
|
('sr', 'Serbian'),
|
umap/static/umap/content.css
CHANGED
|
@@ -282,6 +282,29 @@ ul.umap-autocomplete {
|
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
|
|
285
|
+
/* **************************** */
|
|
286
|
+
/* Dashboard */
|
|
287
|
+
/* **************************** */
|
|
288
|
+
table.maps {
|
|
289
|
+
width: 100%;
|
|
290
|
+
}
|
|
291
|
+
table.maps .map_fragment {
|
|
292
|
+
height: 100px;
|
|
293
|
+
width: 100%;
|
|
294
|
+
min-width: 200px;
|
|
295
|
+
}
|
|
296
|
+
table.maps tbody tr:nth-child(odd) {
|
|
297
|
+
background-color: #f4f4f4;
|
|
298
|
+
}
|
|
299
|
+
table.maps td {
|
|
300
|
+
text-align: center;
|
|
301
|
+
}
|
|
302
|
+
table.maps thead tr {
|
|
303
|
+
line-height: 2em;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
285
308
|
/* **************************** */
|
|
286
309
|
/* Override Leaflet.Storage */
|
|
287
310
|
/* **************************** */
|
|
@@ -64,17 +64,19 @@
|
|
|
64
64
|
<path id="path4353-1-6-1-3-3-9" transform="matrix(1.9 0 0 1.9 -245.02 606.04)" d="m222.11 179.64-1.0488 1.0488 1.582 1.5801-1.582 1.582 1.0488 1.0469 1.582-1.5801 1.5801 1.5801 1.0488-1.0469-1.582-1.582 1.582-1.5801-1.0488-1.0488-1.5801 1.5801z" color="#000000" color-rendering="auto" fill="#f2f2f2" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" stroke="none" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
|
|
65
65
|
</g>
|
|
66
66
|
</g>
|
|
67
|
-
<path id="path4873" d="
|
|
67
|
+
<path id="path4873" d="m108.15 816.36v3.8267h3.8544v-3.8267zm0.51755 4.3517-1.2459 2.3132 1.1669 0.61848 1.244-2.3151zm-1.8689 3.4717-0.27666 0.51571h-2.426v2.2441l-4.0916 4.064 1.3626 1.3528 3.862-3.8342h2.7214v-3.6959l0.015-0.028-0.015-8e-3v-0.0953h-0.17879l-0.97303-0.51571z" color="#000000" color-rendering="auto" fill="#f2f2f2" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" stroke="#999" stroke-width=".25" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
|
|
68
68
|
<g id="g4244" transform="matrix(.51357 -.54309 .54309 .51357 -518.02 506.23)">
|
|
69
69
|
<path id="path4240" transform="matrix(.91922 .97205 -.97205 .91922 152.14 647.93)" d="m220.49 133.52c-0.33017 0.01-0.66239 0.0456-0.99414 0.10742-2.2249 0.41425-4.0267 1.9575-4.832 4.0098l-0.87696-1.8164a0.50005 0.50005 0 0 0-0.83398-0.11328 0.50005 0.50005 0 0 0-0.0664 0.54883l1.459 3.0195a0.50005 0.50005 0 0 0 0.60742 0.25586l2.8438-0.94532a0.50028 0.50028 0 1 0-0.31641-0.94922l-2.002 0.66797c0.61312-1.8902 2.2073-3.3241 4.2012-3.6953 2.2474-0.41845 4.5146 0.59912 5.6953 2.5566 1.1807 1.9575 1.022 4.4377-0.39648 6.2305-1.4185 1.7928-3.7961 2.5154-5.9727 1.8164a0.50005 0.50005 0 1 0-0.30469 0.95117c2.5704 0.82539 5.3874-0.0294 7.0625-2.1465 0.4188-0.52924 0.74532-1.1114 0.97657-1.7207 0.69373-1.828 0.53599-3.9147-0.50977-5.6484-1.22-2.0227-3.4291-3.1977-5.7402-3.1289z" color="#000000" color-rendering="auto" fill="#f2f2f2" image-rendering="auto" shape-rendering="auto" solid-color="#000000" stroke="#999" stroke-linecap="round" stroke-linejoin="round" stroke-width=".25" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
|
|
70
70
|
</g>
|
|
71
|
-
<g id="
|
|
71
|
+
<g id="delete-vertex" transform="translate(-90,-64)">
|
|
72
72
|
<path id="path4349-2-2-9-3-8-3-5" transform="translate(0 852.36)" d="m227.55 53.105-6.0547 3.0273h-3.4414v3.5176l-2.9512 5.9023 1.7891 0.89453 3.1562-6.3145h2.0059v-2.043l6.3906-3.1953z" color="#000000" color-rendering="auto" fill="#f2f2f2" image-rendering="auto" shape-rendering="auto" solid-color="#000000" stroke="#999" stroke-width=".25" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
|
|
73
73
|
<path id="path4353-1-6-1-3-5-1-9" d="m217 907.36 6 6" fill="none" stroke="#fff" stroke-width="2.482"/>
|
|
74
74
|
<path id="path4353-1-6-1-3-5-1" d="m217 907.36 6 6" fill="none" stroke="#4d4d4d" stroke-width="1.4822"/>
|
|
75
75
|
</g>
|
|
76
|
-
<
|
|
77
|
-
|
|
76
|
+
<g id="split-line">
|
|
77
|
+
<path id="path4349-2-2-9-3-8-9" d="m135.12 817.45-1.4688 13.336 1.9883 0.21875 1.4668-13.336z" color="#000000" color-rendering="auto" fill="#f2f2f2" image-rendering="auto" shape-rendering="auto" solid-color="#000000" stroke="#999" stroke-width=".25" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
|
|
78
|
+
<path id="path4349-2-2-3-3-3" d="m129.66 830.95-2.4614-13.189" fill="none" stroke="#808080" stroke-width="2"/>
|
|
79
|
+
</g>
|
|
78
80
|
<g id="g4621-0-6-2" transform="translate(-73.385 -72.287)" fill="#4d4d4d">
|
|
79
81
|
<g id="g4400-8-39-2-3-1-1-8-9" transform="matrix(.57449 0 0 .57449 77.91 445.57)" fill-rule="evenodd" stroke="#4d4d4d" stroke-width="4.2244">
|
|
80
82
|
<path id="path4353-1-6-1-3-6-5-5-7" d="m175.81 948.25 8.3885 8.3497"/>
|
umap/static/umap/img/16.svg
CHANGED
|
@@ -127,15 +127,17 @@
|
|
|
127
127
|
<path id="path4873-4" d="m107.03 825.28-6.3585 6.3585" fill="none" stroke="#464646" stroke-width="2"/>
|
|
128
128
|
<rect id="continue-line" x="104.21" y="824.34" width="4" height="4" fill="#464646"/>
|
|
129
129
|
</g>
|
|
130
|
-
<g id="
|
|
130
|
+
<g id="delete-vertex" transform="translate(-90,-64)">
|
|
131
131
|
<path id="path4349-2-2-9-3-8-3-5" d="m216 918.36 4-8" fill="none" stroke="#808080" stroke-width="2"/>
|
|
132
132
|
<path id="path4349-2-2-9-3-8-3-8" d="m220 910.36 8-4" fill="none" stroke="#808080" stroke-width="2"/>
|
|
133
133
|
<rect id="rect4918-1" x="218.06" y="908.49" width="4" height="4" fill="#808080"/>
|
|
134
134
|
<path id="path4353-1-6-1-3-5-1-9" d="m217 907.36 6 6" fill="none" stroke="#fff" stroke-width="2.482"/>
|
|
135
135
|
<path id="path4353-1-6-1-3-5-1" d="m217 907.36 6 6" fill="none" stroke="#4d4d4d" stroke-width="1.4822"/>
|
|
136
136
|
</g>
|
|
137
|
-
<
|
|
138
|
-
|
|
137
|
+
<g id="split-line" fill="none" stroke-width="2">
|
|
138
|
+
<path id="path4349-2-2-9-3-8-9" d="m134.64 830.89 1.4677-13.336" stroke="#464646"/>
|
|
139
|
+
<path id="path4349-2-2-3-3-3" d="m129.66 830.95-2.4614-13.189" stroke="#808080"/>
|
|
140
|
+
</g>
|
|
139
141
|
<path id="delete-disabled" d="m131 937.36v1c-1.4286 0-3.2857 0.5999-4 2v1h10v-1c-0.71429-1.4001-2.5714-2-4-2v-1zm-4 5 2 9h6l2-9z" fill="#b3b3b3"/>
|
|
140
142
|
</g>
|
|
141
143
|
</svg>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
<svg width="144" height="144" id="svg2" version="1.1" inkscape:version="1.2.2 (b0a8486541, 2022-12-01)" sodipodi:docname="16-white.svg" inkscape:export-filename="16-white.png" inkscape:export-xdpi="96" inkscape:export-ydpi="96" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
5
5
|
<defs id="defs4" />
|
|
6
|
-
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="3.9131365" inkscape:cx="
|
|
6
|
+
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="3.9131365" inkscape:cx="47.659978" inkscape:cy="71.17053" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1920" inkscape:window-height="1019" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" showguides="true" inkscape:guide-bbox="true" inkscape:snap-grids="true" inkscape:snap-to-guides="true" inkscape:showpageshadow="2" inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1">
|
|
7
7
|
<inkscape:grid type="xygrid" id="grid3004" empspacing="4" visible="true" enabled="true" snapvisiblegridlinesonly="true" originx="0" originy="0" />
|
|
8
8
|
<sodipodi:guide orientation="-1,0" position="24,144" id="guide3084" inkscape:locked="false" inkscape:label="" inkscape:color="rgb(0,134,229)" />
|
|
9
9
|
<sodipodi:guide orientation="0,1" position="0,72" id="guide3086" inkscape:locked="false" inkscape:label="" inkscape:color="rgb(0,134,229)" />
|
|
@@ -85,17 +85,19 @@
|
|
|
85
85
|
<path inkscape:connector-curvature="0" id="path4353-1-6-1-3-3-9" transform="matrix(1.9000195,0,0,1.9000195,-245.02393,606.04174)" d="m 222.11328,179.64258 -1.04883,1.04883 1.58203,1.58007 -1.58203,1.58204 1.04883,1.04687 1.58203,-1.58008 1.58008,1.58008 1.04883,-1.04687 -1.58203,-1.58204 1.58203,-1.58007 -1.04883,-1.04883 -1.58008,1.58008 z" style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f2f2f2;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.81628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
|
86
86
|
</g>
|
|
87
87
|
</g>
|
|
88
|
-
<path style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f2f2f2;fill-opacity:1;fill-rule:evenodd;stroke:#999999;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" d="m
|
|
88
|
+
<path style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f2f2f2;fill-opacity:1;fill-rule:evenodd;stroke:#999999;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" d="m 108.14555,816.36218 v 3.8267 h 3.85445 v -3.8267 z m 0.51755,4.35174 -1.24591,2.31321 1.16687,0.61848 1.24404,-2.31507 z m -1.86888,3.47168 -0.27666,0.51571 h -2.42597 v 2.24408 l -4.09159,4.06399 1.36261,1.3528 3.86198,-3.83417 h 2.72145 v -3.6959 l 0.015,-0.028 -0.015,-0.008 v -0.0953 h -0.17879 l -0.97303,-0.51571 z" id="path4873" inkscape:connector-curvature="0" />
|
|
89
89
|
<g id="g4244" transform="matrix(0.51357238,-0.54309229,0.54309229,0.51357238,-518.0199,506.22551)">
|
|
90
90
|
<path style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f2f2f2;fill-opacity:1;fill-rule:nonzero;stroke:#999999;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" d="m 220.49219,133.52344 c -0.33017,0.01 -0.66239,0.0456 -0.99414,0.10742 -2.22487,0.41425 -4.02666,1.95747 -4.83203,4.00976 l -0.87696,-1.8164 a 0.50004998,0.50004998 0 0 0 -0.83398,-0.11328 0.50004998,0.50004998 0 0 0 -0.0664,0.54883 l 1.45899,3.01953 a 0.50004998,0.50004998 0 0 0 0.60742,0.25586 l 2.84375,-0.94532 a 0.50028339,0.50028339 0 1 0 -0.31641,-0.94922 l -2.00195,0.66797 c 0.61312,-1.89015 2.20733,-3.32407 4.20117,-3.69531 2.24744,-0.41845 4.51458,0.59912 5.69531,2.55664 1.18073,1.95754 1.02202,4.43774 -0.39648,6.23047 -1.41851,1.79275 -3.79606,2.51535 -5.97266,1.81641 a 0.50004998,0.50004998 0 1 0 -0.30469,0.95117 c 2.57038,0.82539 5.38736,-0.0294 7.0625,-2.14649 0.4188,-0.52924 0.74532,-1.11137 0.97657,-1.7207 0.69373,-1.828 0.53599,-3.91467 -0.50977,-5.64844 -1.22005,-2.02271 -3.42908,-3.19767 -5.74023,-3.1289 z" transform="matrix(0.91921787,0.9720541,-0.9720541,0.91921787,152.1356,647.93271)" id="path4240" inkscape:connector-curvature="0" />
|
|
91
91
|
</g>
|
|
92
|
-
<g id="
|
|
92
|
+
<g id="delete-vertex" transform="translate(-90,-64)">
|
|
93
93
|
<path style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f2f2f2;fill-opacity:1;fill-rule:nonzero;stroke:#999999;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" d="m 227.55273,53.105469 -6.05468,3.027343 h -3.44141 v 3.517579 l -2.95117,5.902343 1.78906,0.894532 3.15625,-6.314454 h 2.00586 v -2.042968 l 6.39063,-3.195313 z" transform="translate(0,852.36218)" id="path4349-2-2-9-3-8-3-5" inkscape:connector-curvature="0" />
|
|
94
94
|
<path sodipodi:nodetypes="cc" style="fill:none;stroke:#ffffff;stroke-width:2.482;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 217,907.36218 6,6" id="path4353-1-6-1-3-5-1-9" inkscape:connector-curvature="0" />
|
|
95
95
|
<path sodipodi:nodetypes="cc" style="fill:none;stroke:#4d4d4d;stroke-width:1.48224;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 217,907.36218 6,6" id="path4353-1-6-1-3-5-1" inkscape:connector-curvature="0" />
|
|
96
96
|
</g>
|
|
97
|
-
<
|
|
98
|
-
|
|
97
|
+
<g id="split-line">
|
|
98
|
+
<path style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f2f2f2;fill-opacity:1;fill-rule:nonzero;stroke:#999999;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" d="m 135.11523,817.44531 -1.46875,13.33594 1.98829,0.21875 1.46679,-13.33594 z" id="path4349-2-2-9-3-8-9" inkscape:connector-curvature="0" />
|
|
99
|
+
<path style="fill:none;stroke:#808080;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 129.65868,830.95182 -2.4614,-13.1887" id="path4349-2-2-3-3-3" inkscape:connector-curvature="0" />
|
|
100
|
+
</g>
|
|
99
101
|
<g id="g4621-0-6-2" transform="translate(-73.384659,-72.287334)" style="fill:#4d4d4d;fill-opacity:1">
|
|
100
102
|
<g style="fill:#4d4d4d;fill-opacity:1;stroke:#ffffff;stroke-width:4.22442;stroke-miterlimit:4;stroke-dasharray:none" transform="matrix(0.57449139,0,0,0.57449139,77.909804,445.56677)" id="g4400-8-39-2-3-1-1-8-9">
|
|
101
103
|
<path sodipodi:nodetypes="cc" style="fill:#4d4d4d;fill-opacity:1;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:4.22442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 175.80573,948.24562 8.38854,8.34969" id="path4353-1-6-1-3-6-5-5-7" inkscape:connector-curvature="0" />
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
<svg width="144" height="144" id="svg2" version="1.1" inkscape:version="1.2.2 (b0a8486541, 2022-12-01)" sodipodi:docname="16.svg" inkscape:export-filename="/home/ybon/Code/js/Leaflet.Storage/src/img/16.png" inkscape:export-xdpi="89.996864" inkscape:export-ydpi="89.996864" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
5
5
|
<defs id="defs4" />
|
|
6
|
-
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="6.4903658" inkscape:cx="86.
|
|
6
|
+
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="6.4903658" inkscape:cx="86.975067" inkscape:cy="60.628324" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1920" inkscape:window-height="1019" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" showguides="true" inkscape:guide-bbox="true" inkscape:snap-grids="true" inkscape:snap-to-guides="true" inkscape:showpageshadow="2" inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1">
|
|
7
7
|
<inkscape:grid type="xygrid" id="grid3004" empspacing="4" visible="true" enabled="true" snapvisiblegridlinesonly="true" originx="0" originy="0" />
|
|
8
8
|
<sodipodi:guide orientation="-1,0" position="24,144" id="guide3084" inkscape:locked="false" inkscape:label="" inkscape:color="rgb(0,134,229)" />
|
|
9
9
|
<sodipodi:guide orientation="0,1" position="0,96" id="guide3086" inkscape:locked="false" inkscape:label="" inkscape:color="rgb(0,134,229)" />
|
|
@@ -145,15 +145,17 @@
|
|
|
145
145
|
<path style="fill:none;fill-rule:evenodd;stroke:#464646;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" d="m 107.02836,825.2798 -6.35851,6.35851" id="path4873-4" inkscape:connector-curvature="0" sodipodi:nodetypes="cc" />
|
|
146
146
|
<rect style="fill:#464646;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:4, 2;stroke-dashoffset:0;stroke-opacity:1" id="continue-line" width="4" height="4" x="104.20859" y="824.3382" />
|
|
147
147
|
</g>
|
|
148
|
-
<g id="
|
|
148
|
+
<g id="delete-vertex" transform="translate(-90,-64)">
|
|
149
149
|
<path sodipodi:nodetypes="cc" style="fill:none;stroke:#808080;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 216,918.36218 4,-8" id="path4349-2-2-9-3-8-3-5" inkscape:connector-curvature="0" />
|
|
150
150
|
<path sodipodi:nodetypes="cc" style="fill:none;stroke:#808080;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 220,910.36218 8,-4" id="path4349-2-2-9-3-8-3-8" inkscape:connector-curvature="0" />
|
|
151
151
|
<rect style="fill:#808080;fill-opacity:1;stroke:none" id="rect4918-1" width="4" height="4" x="218.05635" y="908.49438" />
|
|
152
152
|
<path sodipodi:nodetypes="cc" style="fill:none;stroke:#ffffff;stroke-width:2.482;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 217,907.36218 6,6" id="path4353-1-6-1-3-5-1-9" inkscape:connector-curvature="0" />
|
|
153
153
|
<path sodipodi:nodetypes="cc" style="fill:none;stroke:#4d4d4d;stroke-width:1.48224;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 217,907.36218 6,6" id="path4353-1-6-1-3-5-1" inkscape:connector-curvature="0" />
|
|
154
154
|
</g>
|
|
155
|
-
<
|
|
156
|
-
|
|
155
|
+
<g id="split-line">
|
|
156
|
+
<path style="fill:none;stroke:#464646;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 134.64055,830.8915 1.46774,-13.3359" id="path4349-2-2-9-3-8-9" inkscape:connector-curvature="0" />
|
|
157
|
+
<path style="fill:none;stroke:#808080;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 129.65868,830.95182 -2.4614,-13.1887" id="path4349-2-2-3-3-3" inkscape:connector-curvature="0" />
|
|
158
|
+
</g>
|
|
157
159
|
<path style="fill:#b3b3b3;fill-opacity:1;fill-rule:nonzero;stroke:none" d="m 131,937.36218 v 1 c -1.42857,0 -3.28571,0.5999 -4,2 v 1 h 10 v -1 c -0.71429,-1.4001 -2.57143,-2 -4,-2 v -1 z m -4,5 2,9 h 6 l 2,-9 z" id="delete-disabled" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccccccccccc" inkscape:label="" />
|
|
158
160
|
</g>
|
|
159
161
|
</svg>
|
|
@@ -472,7 +472,7 @@ L.U.DataLayersControl = L.Control.extend({
|
|
|
472
472
|
|
|
473
473
|
if (L.Browser.pointer) {
|
|
474
474
|
L.DomEvent.disableClickPropagation(container)
|
|
475
|
-
L.DomEvent.on(container, '
|
|
475
|
+
L.DomEvent.on(container, 'wheel', L.DomEvent.stopPropagation)
|
|
476
476
|
L.DomEvent.on(container, 'MozMousePixelScroll', L.DomEvent.stopPropagation)
|
|
477
477
|
}
|
|
478
478
|
if (!L.Browser.touch) {
|
|
@@ -1019,6 +1019,39 @@ L.U.Map.include({
|
|
|
1019
1019
|
this.ui.openPanel({ data: { html: container }, actions: actions })
|
|
1020
1020
|
},
|
|
1021
1021
|
|
|
1022
|
+
EXPORT_TYPES: {
|
|
1023
|
+
geojson: {
|
|
1024
|
+
formatter: function (map) {
|
|
1025
|
+
return JSON.stringify(map.toGeoJSON(), null, 2)
|
|
1026
|
+
},
|
|
1027
|
+
ext: '.geojson',
|
|
1028
|
+
filetype: 'application/json',
|
|
1029
|
+
},
|
|
1030
|
+
gpx: {
|
|
1031
|
+
formatter: function (map) {
|
|
1032
|
+
return togpx(map.toGeoJSON())
|
|
1033
|
+
},
|
|
1034
|
+
ext: '.gpx',
|
|
1035
|
+
filetype: 'application/xml',
|
|
1036
|
+
},
|
|
1037
|
+
kml: {
|
|
1038
|
+
formatter: function (map) {
|
|
1039
|
+
return tokml(map.toGeoJSON())
|
|
1040
|
+
},
|
|
1041
|
+
ext: '.kml',
|
|
1042
|
+
filetype: 'application/vnd.google-earth.kml+xml',
|
|
1043
|
+
},
|
|
1044
|
+
umap: {
|
|
1045
|
+
name: L._('Full map data'),
|
|
1046
|
+
formatter: function (map) {
|
|
1047
|
+
return map.serialize()
|
|
1048
|
+
},
|
|
1049
|
+
ext: '.umap',
|
|
1050
|
+
filetype: 'application/json',
|
|
1051
|
+
selected: true,
|
|
1052
|
+
},
|
|
1053
|
+
},
|
|
1054
|
+
|
|
1022
1055
|
renderShareBox: function () {
|
|
1023
1056
|
const container = L.DomUtil.create('div', 'umap-share')
|
|
1024
1057
|
const embedTitle = L.DomUtil.add('h4', '', container, L._('Embed the map'))
|
|
@@ -1091,66 +1124,36 @@ L.U.Map.include({
|
|
|
1091
1124
|
else exportCaveat.style.display = 'inherit'
|
|
1092
1125
|
}
|
|
1093
1126
|
L.DomEvent.on(typeInput, 'change', toggleCaveat)
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1096
|
-
formatter: function (map) {
|
|
1097
|
-
return JSON.stringify(map.toGeoJSON(), null, 2)
|
|
1098
|
-
},
|
|
1099
|
-
ext: '.geojson',
|
|
1100
|
-
filetype: 'application/json',
|
|
1101
|
-
},
|
|
1102
|
-
gpx: {
|
|
1103
|
-
formatter: function (map) {
|
|
1104
|
-
return togpx(map.toGeoJSON())
|
|
1105
|
-
},
|
|
1106
|
-
ext: '.gpx',
|
|
1107
|
-
filetype: 'application/xml',
|
|
1108
|
-
},
|
|
1109
|
-
kml: {
|
|
1110
|
-
formatter: function (map) {
|
|
1111
|
-
return tokml(map.toGeoJSON())
|
|
1112
|
-
},
|
|
1113
|
-
ext: '.kml',
|
|
1114
|
-
filetype: 'application/vnd.google-earth.kml+xml',
|
|
1115
|
-
},
|
|
1116
|
-
umap: {
|
|
1117
|
-
name: L._('Full map data'),
|
|
1118
|
-
formatter: function (map) {
|
|
1119
|
-
return map.serialize()
|
|
1120
|
-
},
|
|
1121
|
-
ext: '.umap',
|
|
1122
|
-
filetype: 'application/json',
|
|
1123
|
-
selected: true,
|
|
1124
|
-
},
|
|
1125
|
-
}
|
|
1126
|
-
for (const key in types) {
|
|
1127
|
-
if (types.hasOwnProperty(key)) {
|
|
1127
|
+
for (const key in this.EXPORT_TYPES) {
|
|
1128
|
+
if (this.EXPORT_TYPES.hasOwnProperty(key)) {
|
|
1128
1129
|
option = L.DomUtil.create('option', '', typeInput)
|
|
1129
1130
|
option.value = key
|
|
1130
|
-
option.textContent =
|
|
1131
|
-
if (
|
|
1131
|
+
option.textContent = this.EXPORT_TYPES[key].name || key
|
|
1132
|
+
if (this.EXPORT_TYPES[key].selected) option.selected = true
|
|
1132
1133
|
}
|
|
1133
1134
|
}
|
|
1134
1135
|
toggleCaveat()
|
|
1135
1136
|
const download = L.DomUtil.create('a', 'button', container)
|
|
1136
1137
|
download.textContent = L._('Download data')
|
|
1137
|
-
L.DomEvent.on(
|
|
1138
|
-
download,
|
|
1139
|
-
'click',
|
|
1140
|
-
() => {
|
|
1141
|
-
const type = types[typeInput.value]
|
|
1142
|
-
const content = type.formatter(this)
|
|
1143
|
-
let name = this.options.name || 'data'
|
|
1144
|
-
name = name.replace(/[^a-z0-9]/gi, '_').toLowerCase()
|
|
1145
|
-
download.download = name + type.ext
|
|
1146
|
-
window.URL = window.URL || window.webkitURL
|
|
1147
|
-
const blob = new Blob([content], { type: type.filetype })
|
|
1148
|
-
download.href = window.URL.createObjectURL(blob)
|
|
1149
|
-
},
|
|
1150
|
-
this
|
|
1151
|
-
)
|
|
1138
|
+
L.DomEvent.on(download, 'click', () => this.download(typeInput.value), this)
|
|
1152
1139
|
this.ui.openPanel({ data: { html: container } })
|
|
1153
1140
|
},
|
|
1141
|
+
|
|
1142
|
+
download: function (mode) {
|
|
1143
|
+
const type = this.EXPORT_TYPES[mode || 'umap']
|
|
1144
|
+
const content = type.formatter(this)
|
|
1145
|
+
let name = this.options.name || 'data'
|
|
1146
|
+
name = name.replace(/[^a-z0-9]/gi, '_').toLowerCase()
|
|
1147
|
+
window.URL = window.URL || window.webkitURL
|
|
1148
|
+
const blob = new Blob([content], { type: type.filetype })
|
|
1149
|
+
const el = document.createElement('a')
|
|
1150
|
+
el.download = name + type.ext
|
|
1151
|
+
el.href = window.URL.createObjectURL(blob)
|
|
1152
|
+
el.style.display = 'none'
|
|
1153
|
+
document.body.appendChild(el)
|
|
1154
|
+
el.click()
|
|
1155
|
+
document.body.removeChild(el)
|
|
1156
|
+
},
|
|
1154
1157
|
})
|
|
1155
1158
|
|
|
1156
1159
|
L.U.TileLayerControl = L.Control.extend({
|
|
@@ -580,6 +580,20 @@ L.U.Marker = L.Marker.extend({
|
|
|
580
580
|
this.resetTooltip()
|
|
581
581
|
},
|
|
582
582
|
|
|
583
|
+
_getTooltipAnchor: function () {
|
|
584
|
+
const anchor = this.options.icon.options.tooltipAnchor,
|
|
585
|
+
direction = this.getOption('labelDirection')
|
|
586
|
+
if (direction === 'left') {
|
|
587
|
+
anchor.x *= -1
|
|
588
|
+
} else if (direction === 'bottom') {
|
|
589
|
+
anchor.x = 0
|
|
590
|
+
anchor.y = 0
|
|
591
|
+
} else if (direction === 'top') {
|
|
592
|
+
anchor.x = 0
|
|
593
|
+
}
|
|
594
|
+
return anchor
|
|
595
|
+
},
|
|
596
|
+
|
|
583
597
|
disconnectFromDataLayer: function (datalayer) {
|
|
584
598
|
this.options.icon.datalayer = null
|
|
585
599
|
L.U.FeatureMixin.disconnectFromDataLayer.call(this, datalayer)
|
umap/static/umap/js/umap.js
CHANGED
|
@@ -91,12 +91,8 @@ L.U.Map.include({
|
|
|
91
91
|
|
|
92
92
|
this.ui = new L.U.UI(this._container)
|
|
93
93
|
this.xhr = new L.U.Xhr(this.ui)
|
|
94
|
-
this.xhr.on('
|
|
95
|
-
|
|
96
|
-
})
|
|
97
|
-
this.xhr.on('datalaod', function (e) {
|
|
98
|
-
this.fire('datalaod', e)
|
|
99
|
-
})
|
|
94
|
+
this.xhr.on('dataloading', (e) => this.fire('dataloading', e))
|
|
95
|
+
this.xhr.on('dataload', (e) => this.fire('dataload', e))
|
|
100
96
|
|
|
101
97
|
this.initLoader()
|
|
102
98
|
this.name = this.options.name
|
|
@@ -255,13 +251,16 @@ L.U.Map.include({
|
|
|
255
251
|
}
|
|
256
252
|
this.initShortcuts()
|
|
257
253
|
this.onceDatalayersLoaded(function () {
|
|
258
|
-
if (
|
|
254
|
+
if (L.Util.queryString('share')) this.renderShareBox()
|
|
255
|
+
else if (this.options.onLoadPanel === 'databrowser') this.openBrowser()
|
|
259
256
|
else if (this.options.onLoadPanel === 'caption') this.displayCaption()
|
|
260
257
|
else if (this.options.onLoadPanel === 'datafilters') this.openFilter()
|
|
261
258
|
})
|
|
262
259
|
this.onceDataLoaded(function () {
|
|
263
260
|
const slug = L.Util.queryString('feature')
|
|
264
261
|
if (slug && this.features_index[slug]) this.features_index[slug].view()
|
|
262
|
+
if (L.Util.queryString('edit')) this.enableEdit()
|
|
263
|
+
if (L.Util.queryString('download')) this.download()
|
|
265
264
|
})
|
|
266
265
|
|
|
267
266
|
window.onbeforeunload = (e) => {
|
|
@@ -976,7 +976,7 @@ L.U.DataLayer = L.Evented.extend({
|
|
|
976
976
|
buildVersionsFieldset: function (container) {
|
|
977
977
|
const appendVersion = function (data) {
|
|
978
978
|
const date = new Date(parseInt(data.at, 10))
|
|
979
|
-
const content = `${date.
|
|
979
|
+
const content = `${date.toLocaleString(L.lang)} (${
|
|
980
980
|
parseInt(data.size) / 1000
|
|
981
981
|
}Kb)`
|
|
982
982
|
const el = L.DomUtil.create('div', 'umap-datalayer-version', versionsContainer)
|
|
@@ -1060,7 +1060,7 @@ L.U.DataLayer = L.Evented.extend({
|
|
|
1060
1060
|
},
|
|
1061
1061
|
|
|
1062
1062
|
isVisible: function () {
|
|
1063
|
-
return this.map.hasLayer(this.layer)
|
|
1063
|
+
return this.layer && this.map.hasLayer(this.layer)
|
|
1064
1064
|
},
|
|
1065
1065
|
|
|
1066
1066
|
canBrowse: function () {
|
|
@@ -35,13 +35,13 @@ L.U.MapPermissions = L.Class.extend({
|
|
|
35
35
|
isOwner: function () {
|
|
36
36
|
return (
|
|
37
37
|
this.map.options.user &&
|
|
38
|
-
this.map.options.
|
|
39
|
-
this.map.options.user.id == this.map.options.
|
|
38
|
+
this.map.permissions.options.owner &&
|
|
39
|
+
this.map.options.user.id == this.map.permissions.options.owner.id
|
|
40
40
|
)
|
|
41
41
|
},
|
|
42
42
|
|
|
43
43
|
isAnonymousMap: function () {
|
|
44
|
-
return !this.map.options.
|
|
44
|
+
return !this.map.permissions.options.owner
|
|
45
45
|
},
|
|
46
46
|
|
|
47
47
|
getMap: function () {
|
umap/static/umap/js/umap.ui.js
CHANGED
|
@@ -11,7 +11,7 @@ L.U.UI = L.Evented.extend({
|
|
|
11
11
|
this.container = L.DomUtil.create('div', 'leaflet-ui-container', this.parent)
|
|
12
12
|
L.DomEvent.disableClickPropagation(this.container)
|
|
13
13
|
L.DomEvent.on(this.container, 'contextmenu', L.DomEvent.stopPropagation) // Do not activate our custom context menu.
|
|
14
|
-
L.DomEvent.on(this.container, '
|
|
14
|
+
L.DomEvent.on(this.container, 'wheel', L.DomEvent.stopPropagation)
|
|
15
15
|
L.DomEvent.on(this.container, 'MozMousePixelScroll', L.DomEvent.stopPropagation)
|
|
16
16
|
this._panel = L.DomUtil.create('div', '', this.container)
|
|
17
17
|
this._panel.id = 'umap-ui-container'
|