umap-project 2.6.3__py3-none-any.whl → 2.7.0b0__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/admin.py +64 -1
- umap/context_processors.py +1 -0
- umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
- umap/locale/cs_CZ/LC_MESSAGES/django.po +96 -92
- umap/locale/de/LC_MESSAGES/django.mo +0 -0
- umap/locale/de/LC_MESSAGES/django.po +19 -18
- umap/locale/en/LC_MESSAGES/django.po +47 -43
- umap/locale/fr/LC_MESSAGES/django.mo +0 -0
- umap/locale/fr/LC_MESSAGES/django.po +51 -47
- umap/locale/pt/LC_MESSAGES/django.mo +0 -0
- umap/locale/pt/LC_MESSAGES/django.po +64 -60
- umap/management/commands/clean_tilelayer.py +152 -0
- umap/management/commands/purge_purgatory.py +28 -0
- umap/models.py +27 -2
- umap/settings/base.py +2 -0
- umap/static/umap/base.css +4 -4
- umap/static/umap/css/contextmenu.css +5 -0
- umap/static/umap/css/icon.css +7 -2
- umap/static/umap/img/16-white.svg +9 -2
- umap/static/umap/img/16.svg +3 -0
- umap/static/umap/img/source/16-white.svg +10 -3
- umap/static/umap/img/source/16.svg +4 -1
- umap/static/umap/js/modules/autocomplete.js +7 -3
- umap/static/umap/js/modules/browser.js +7 -1
- umap/static/umap/js/modules/caption.js +6 -1
- umap/static/umap/js/modules/data/features.js +176 -2
- umap/static/umap/js/modules/data/layer.js +31 -26
- umap/static/umap/js/modules/formatter.js +3 -2
- umap/static/umap/js/modules/global.js +2 -0
- umap/static/umap/js/modules/importers/communesfr.js +13 -1
- umap/static/umap/js/modules/permissions.js +123 -93
- umap/static/umap/js/modules/rendering/ui.js +37 -212
- umap/static/umap/js/modules/sync/engine.js +365 -14
- umap/static/umap/js/modules/sync/hlc.js +106 -0
- umap/static/umap/js/modules/sync/updaters.js +4 -4
- umap/static/umap/js/modules/sync/websocket.js +1 -1
- umap/static/umap/js/modules/ui/base.js +2 -2
- umap/static/umap/js/modules/ui/contextmenu.js +34 -17
- umap/static/umap/js/modules/urls.js +5 -1
- umap/static/umap/js/modules/utils.js +5 -1
- umap/static/umap/js/umap.controls.js +47 -47
- umap/static/umap/js/umap.core.js +3 -3
- umap/static/umap/js/umap.forms.js +3 -1
- umap/static/umap/js/umap.js +95 -112
- umap/static/umap/locale/br.js +13 -4
- umap/static/umap/locale/br.json +13 -4
- umap/static/umap/locale/ca.js +21 -12
- umap/static/umap/locale/ca.json +21 -12
- umap/static/umap/locale/cs_CZ.js +87 -78
- umap/static/umap/locale/cs_CZ.json +87 -78
- umap/static/umap/locale/de.js +17 -8
- umap/static/umap/locale/de.json +17 -8
- umap/static/umap/locale/en.js +9 -2
- umap/static/umap/locale/en.json +9 -2
- umap/static/umap/locale/eu.js +10 -3
- umap/static/umap/locale/eu.json +10 -3
- umap/static/umap/locale/fa_IR.js +11 -4
- umap/static/umap/locale/fa_IR.json +11 -4
- umap/static/umap/locale/fr.js +11 -4
- umap/static/umap/locale/fr.json +11 -4
- umap/static/umap/locale/hu.js +10 -3
- umap/static/umap/locale/hu.json +10 -3
- umap/static/umap/locale/pt.js +17 -8
- umap/static/umap/locale/pt.json +17 -8
- umap/static/umap/locale/pt_PT.js +13 -4
- umap/static/umap/locale/pt_PT.json +13 -4
- umap/static/umap/locale/zh_TW.js +13 -4
- umap/static/umap/locale/zh_TW.json +13 -4
- umap/static/umap/map.css +7 -22
- umap/static/umap/unittests/hlc.js +158 -0
- umap/static/umap/unittests/sync.js +321 -15
- umap/static/umap/unittests/utils.js +23 -0
- umap/static/umap/vendors/georsstogeojson/GeoRSSToGeoJSON.js +111 -80
- umap/templates/umap/dashboard_menu.html +4 -2
- umap/templates/umap/js.html +0 -4
- umap/tests/integration/test_anonymous_owned_map.py +1 -0
- umap/tests/integration/test_basics.py +1 -1
- umap/tests/integration/test_circles_layer.py +12 -0
- umap/tests/integration/test_datalayer.py +5 -0
- umap/tests/integration/test_draw_polygon.py +17 -9
- umap/tests/integration/test_draw_polyline.py +12 -8
- umap/tests/integration/test_edit_datalayer.py +4 -6
- umap/tests/integration/test_edit_map.py +1 -1
- umap/tests/integration/test_import.py +5 -0
- umap/tests/integration/test_map.py +5 -0
- umap/tests/integration/test_owned_map.py +1 -1
- umap/tests/integration/test_view_polygon.py +12 -12
- umap/tests/integration/test_websocket_sync.py +65 -3
- umap/tests/test_clean_tilelayer.py +83 -0
- umap/tests/test_datalayer.py +24 -0
- umap/tests/test_map_views.py +1 -0
- umap/tests/test_purge_purgatory.py +25 -0
- umap/tests/test_websocket_server.py +22 -0
- umap/urls.py +5 -1
- umap/views.py +6 -3
- umap/websocket_server.py +130 -27
- {umap_project-2.6.3.dist-info → umap_project-2.7.0b0.dist-info}/METADATA +9 -9
- {umap_project-2.6.3.dist-info → umap_project-2.7.0b0.dist-info}/RECORD +102 -97
- umap/static/umap/vendors/contextmenu/leaflet.contextmenu.min.css +0 -1
- umap/static/umap/vendors/contextmenu/leaflet.contextmenu.min.js +0 -7
- {umap_project-2.6.3.dist-info → umap_project-2.7.0b0.dist-info}/WHEEL +0 -0
- {umap_project-2.6.3.dist-info → umap_project-2.7.0b0.dist-info}/entry_points.txt +0 -0
- {umap_project-2.6.3.dist-info → umap_project-2.7.0b0.dist-info}/licenses/LICENSE +0 -0
|
@@ -130,8 +130,8 @@
|
|
|
130
130
|
<rect id="rect4243-2-5" x="89" y="901.36" width="2" height="2" fill="#f2f2f2"/>
|
|
131
131
|
<path id="delete-30-7" 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" stroke="#999" stroke-width=".25"/>
|
|
132
132
|
<path id="path437" d="m113.29 943.47 0.9072 0.5491c0.1786 0.10817 0.2366 0.34196 0.1294 0.52223-0.0319 0.0535-0.0764 0.0983-0.1294 0.13055l-7.0072 4.2412-7.0071-4.2412c-0.17869-0.10817-0.23664-0.34196-0.12942-0.52222 0.0319-0.0536 0.0763-0.0984 0.12942-0.13056l0.90714-0.5491 6.0999 3.6922zm0 3.578 0.9072 0.5491c0.1786 0.1081 0.2366 0.3419 0.1294 0.5222-0.0319 0.0535-0.0764 0.0983-0.1294 0.1306l-6.6189 4.0061c-0.239 0.1447-0.53753 0.1447-0.77652 0l-6.6188-4.0061c-0.17869-0.1082-0.23664-0.342-0.12942-0.5223 0.0319-0.0536 0.0763-0.0984 0.12942-0.1305l0.90714-0.5491 6.0999 3.6921zm-5.7117-10.575 6.6189 4.0062c0.1786 0.10815 0.2366 0.34196 0.1294 0.52222-0.0319 0.0536-0.0764 0.0984-0.1294 0.13056l-7.0072 4.2412-7.0071-4.2412c-0.17869-0.10815-0.23664-0.34196-0.12942-0.52222 0.0319-0.0536 0.0763-0.0984 0.12942-0.13056l6.6188-4.0062c0.23899-0.14465 0.53752-0.14465 0.77652 0z" fill="#f2f2f2" stroke="#999" stroke-width=".178"/>
|
|
133
|
-
<path id="linestring" d="m7
|
|
134
|
-
<path id="polygon" d="m29
|
|
133
|
+
<path id="linestring" d="m7 889.36v2h1.8828l6.1172 3.0586v0.23438l-6.707 6.707h-1.293v2h2v-1.293l6.707-6.707h1.293v-2h-1.8828l-6.1172-3.0586v-0.94141z" color="#000000" fill="#f2f2f2" fill-rule="evenodd" stroke="#999" stroke-width=".2"/>
|
|
134
|
+
<path id="polygon" d="m29 888.36v2h0.92773l-0.85547 12h-1.0723v2h2v-1.1992l8-1.6016v0.80078h2v-2h-0.77734l1.5547-7h1.2227v-2h-2v0.72656l-9-2.4531v-1.2734z" fill="#f2f2f2" fill-rule="evenodd" stroke="#999" stroke-width=".2"/>
|
|
135
135
|
<path id="marker" d="m84 936.36c-2.625 0-5.25 1.7022-6 5.1064 0 2.0426 1.5 6.1277 6 10.894 4.5-4.7659 6-8.851 6-10.894-0.75-3.4042-3.375-5.1064-6-5.1064zm0 2.383c1.6569 0 3 1.2193 3 2.7234s-1.3431 2.7234-3 2.7234c-1.6568 0-3-1.2194-3-2.7234s1.3432-2.7234 3-2.7234z" fill="#f2f2f2" stroke="#999" stroke-width=".25"/>
|
|
136
136
|
<g id="settings" class="sprite" transform="matrix(.16295 0 0 .16296 27.835 912.23)" fill="#f2f2f2" stroke="#999" stroke-width="1.4974">
|
|
137
137
|
<path id="path27812" d="m98.762 43.652c-0.186-1.386-1.481-2.582-2.876-2.659l-6.172-0.337c-1.395-0.076-2.899-1.224-3.341-2.55l-2.28-5.518c-0.629-1.249-0.379-3.121 0.553-4.161l4.122-4.6c0.933-1.042 0.962-2.77 0.066-3.842l-8.813-8.813c-1.073-0.897-2.803-0.867-3.845 0.065l-4.598 4.122c-1.039 0.934-2.915 1.182-4.161 0.551l-5.521-2.279c-1.324-0.442-2.472-1.945-2.549-3.34l-0.337-6.17c-0.077-1.396-1.272-2.691-2.659-2.878 0 0-3.252-0.44-6.248-0.44-2.991 0-6.243 0.44-6.243 0.44-1.386 0.188-2.582 1.483-2.658 2.878l-0.338 6.17c-0.076 1.396-1.224 2.898-2.551 3.34l-5.517 2.279c-1.249 0.631-3.122 0.382-4.161-0.551l-4.601-4.122c-1.042-0.932-2.769-0.962-3.842-0.065l-8.813 8.813c-0.897 1.073-0.867 2.801 0.066 3.842l4.122 4.6c0.933 1.041 1.182 2.913 0.551 4.161l-2.279 5.518c-0.442 1.326-1.946 2.474-3.34 2.55l-6.17 0.337c-1.396 0.077-2.691 1.272-2.879 2.659 0 0-0.439 3.253-0.439 6.243s0.44 6.24 0.44 6.24c0.188 1.389 1.483 2.582 2.879 2.659l6.169 0.339c1.396 0.075 2.898 1.225 3.341 2.549l2.278 5.517c0.631 1.248 0.381 3.122-0.551 4.163l-4.122 4.598c-0.933 1.042-0.963 2.771-0.066 3.845l8.814 8.813c1.073 0.896 2.801 0.866 3.842-0.066l4.6-4.122c1.041-0.932 2.913-1.182 4.161-0.553l5.517 2.28c1.327 0.441 2.475 1.946 2.55 3.343l0.338 6.168c0.076 1.395 1.272 2.692 2.658 2.88 0 0 3.252 0.439 6.244 0.439 2.996 0 6.25-0.439 6.25-0.439 1.385-0.188 2.58-1.485 2.657-2.88l0.337-6.168c0.077-1.396 1.225-2.901 2.551-3.343l5.517-2.28c1.248-0.629 3.122-0.379 4.163 0.553l4.598 4.122c1.042 0.933 2.771 0.964 3.843 0.067l8.815-8.814c0.896-1.073 0.866-2.803-0.066-3.845l-4.122-4.598c-0.932-1.041-1.182-2.915-0.553-4.163l2.28-5.517c0.441-1.324 1.946-2.474 3.341-2.549l6.172-0.339c1.395-0.077 2.692-1.271 2.876-2.659 0 0 0.441-3.25 0.441-6.24s-0.441-6.243-0.441-6.243zm-48.658 18.709c-6.886 0-12.468-5.585-12.468-12.467 0-6.885 5.582-12.467 12.468-12.467 6.89 0 12.475 5.582 12.475 12.467-1e-3 6.882-5.586 12.467-12.475 12.467z" fill="#f2f2f2" stroke="#999" stroke-width="1.4974"/>
|
|
@@ -189,5 +189,12 @@
|
|
|
189
189
|
<path id="path8" transform="translate(0 812.36)" d="m8.1903 37.424c-0.48722-0.17411-0.79231-0.44207-0.99467-0.87363l-0.1908-0.40689-1.3703-0.0034c-1.4983-0.0037-1.5911-0.03214-1.5406-0.47225l0.026557-0.23161 2.8423-0.0451 0.19827-0.3895c0.34789-0.68343 0.86349-1.0091 1.5923-1.0058 0.71771 0.0033 1.3415 0.43242 1.6291 1.1207l0.11636 0.27848h4.6574c4.5203 0 4.66 0.0047 4.7428 0.1594 0.1159 0.21656 0.10767 0.30093-0.04419 0.45278-0.11466 0.11466-0.66063 0.1295-4.7632 0.1295h-4.6337l-0.10498 0.2903c-0.15257 0.42194-0.62749 0.84447-1.1103 0.98785-0.49622 0.14736-0.6615 0.14879-1.0524 0.0091zm0.96896-0.84513c0.698-0.33122 0.698-1.3772 0-1.7084-0.35156-0.16682-0.49258-0.16849-0.82704-0.0098-0.33761 0.16021-0.5445 0.51333-0.5445 0.92936 0 0.36801 0.16007 0.60614 0.53566 0.79693 0.31576 0.16039 0.48419 0.15875 0.83587-0.0081z" fill="#f2f2f2" stroke="#999" stroke-width=".25" style="paint-order:fill markers stroke"/>
|
|
190
190
|
<path id="path9" transform="translate(0 812.36)" d="m12.773 42.244c-0.4045-0.18728-0.73246-0.52685-0.9029-0.93487l-0.12875-0.30821-7.6214-0.04285-0.026557-0.23161c-0.055311-0.48238-0.16774-0.4688 3.8893-0.46961l3.7189-7.33e-4 0.21287-0.43192c0.65163-1.3222 2.4726-1.2846 3.1257 0.06446l0.17859 0.36892h2.2972c2.2584 0 2.2988 3e-3 2.391 0.17524 0.06808 0.12721 0.06936 0.22886 0.0047 0.37084l-0.08912 0.1956h-4.6108l-0.15493 0.35024c-0.38713 0.87516-1.4373 1.2865-2.2839 0.89448zm1.0632-0.70036c0.37802-0.15795 0.5443-0.42579 0.54116-0.87174-4e-3 -0.57358-0.36338-0.90877-0.9743-0.90877-0.31204 0-0.40386 0.04292-0.64992 0.30383-0.25777 0.27331-0.28248 0.33986-0.2461 0.66262 0.04524 0.40136 0.22819 0.65122 0.5956 0.81339 0.31718 0.14001 0.39991 0.14008 0.73356 6.68e-4z" fill="#f2f2f2" stroke="#999" stroke-width=".25" style="paint-order:fill markers stroke"/>
|
|
191
191
|
<path id="path1-67-5" d="m154.68 963.54 4.7344 4.7344-5.0508 4.6836-1.3594-1.4668 3.5274-3.2695-3.2656-3.2656z" color="#000000" fill="#f2f2f2" fill-rule="evenodd" stroke="#999" stroke-width=".25"/>
|
|
192
|
+
<path id="copy" d="m58 914.36v3.5h4v4h3.5v-7.5zm-4 4v7.5h7.5v-7.5z" fill="#f2f2f2" style="paint-order:fill markers stroke"/>
|
|
193
|
+
<g id="g1-5" transform="translate(.1 .1)">
|
|
194
|
+
<g id="g24" fill="#f2f2f2" stroke="#999" stroke-width=".2">
|
|
195
|
+
<path id="path24" d="m12 912.36c-4.4183 0-8 3.5817-8 8 0.00463 1.6156 0.49829 3.1919 1.416 4.5215 0.19802 0.28729 0.41463 0.56131 0.64844 0.82032 1.5128 1.6866 3.6699 2.6526 5.9355 2.6582 2.2669-6e-3 4.4249-0.97357 5.9375-2.6621 0.23535-0.26077 0.45327-0.53676 0.65234-0.82617 0.91377-1.3275 1.4053-2.9001 1.4102-4.5117 0-4.4183-3.5817-8-8-8zm-5.3242 12.506c1.3285-1.5609 3.2745-2.461 5.3242-2.4629 2.0504 1e-3 3.9972 0.90149 5.3262 2.4629 0 0-0.0035-3e-3 0.0059 6e-3 0 0-0.5371 0.5762-0.83984 0.82812-0.17533 0.14821-0.35784 0.2877-0.54687 0.41797-0.06626 0.0467-0.13333 0.0923-0.20117 0.13672-0.2448 0.15763-0.4992 0.29983-0.76172 0.42578-0.93187 0.44366-1.9503 0.67577-2.9824 0.67969-0.61808-5e-3 -1.2328-0.0915-1.8281-0.25781-0.67532-0.18416-1.3192-0.46858-1.9102-0.84375-0.0685-0.0444-0.13622-0.09-0.20312-0.13672-0.00521-4e-3 -0.010422-8e-3 -0.015625-0.0117-0.18766-0.12974-0.36887-0.26858-0.54297-0.41602-0.29972-0.24977-0.57803-0.52416-0.83203-0.82031m-0.5918-0.81445c-0.69766-1.1081-1.0705-2.3898-1.0762-3.6992 0-3.866 3.134-7 7-7l-4.1e-5 -1.6e-4c3.866 0 7 3.134 7 7-0.0054 1.3023-0.37406 2.5773-1.0645 3.6816-1.5163-1.6794-3.6729-2.6381-5.9355-2.6387-2.2613 8e-3 -4.4134 0.97341-5.9238 2.6562" style="paint-order:fill markers stroke"/>
|
|
196
|
+
<path id="path11" d="m12 914.86a2.5 2.5 0 0 0-2.5 2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0 2.5-2.5 2.5 2.5 0 0 0-2.5-2.5zm0 1a1.5 1.5 0 0 1 1.5 1.5 1.5 1.5 0 0 1-1.5 1.5 1.5 1.5 0 0 1-1.5-1.5 1.5 1.5 0 0 1 1.5-1.5z" style="paint-order:fill markers stroke"/>
|
|
197
|
+
</g>
|
|
198
|
+
</g>
|
|
192
199
|
</g>
|
|
193
200
|
</svg>
|
umap/static/umap/img/16.svg
CHANGED
|
@@ -177,5 +177,8 @@
|
|
|
177
177
|
<path id="path1-675" d="m87.167 966.62-3.1666-2.9964-3.1666 2.9964-0.83338-0.78858 3.4333-3.2487c0.31298-0.29613 0.82041-0.29613 1.1334 0l3.4332 3.2487zm-6.3333 3.4812 3.1666 2.9964 3.1666-2.9964 0.83336 0.78859-3.4333 3.2487c-0.31297 0.29608-0.82041 0.29608-1.1334 0l-3.4333-3.2487z" clip-rule="evenodd" fill="#464646" fill-rule="evenodd"/>
|
|
178
178
|
<path id="path5" d="m63.167 974.36-3.1666-2.9964-3.1666 2.9964-0.83336-0.78859 3.4333-3.2487c0.31297-0.29608 0.82041-0.29608 1.1334 0l3.4333 3.2487z" fill="#464646"/>
|
|
179
179
|
<path id="path1-675-2" d="m56 963.15 3.4332 3.2487c0.31298 0.29613 0.82041 0.29613 1.1334 0l3.4333-3.2487-0.83338-0.78858-3.1666 2.9964-3.1666-2.9964z" fill="#464646"/>
|
|
180
|
+
<text id="text4457" x="5.9999995" y="897.90784" fill="#000000" font-family="sans-serif" letter-spacing="0px" word-spacing="0px" style="line-height:0%" xml:space="preserve"><tspan id="tspan4459" x="5.9999995" y="897.90784" font-family="sans-serif" font-size="40px" style="line-height:1.25"> </tspan></text>
|
|
181
|
+
<path id="linestring" d="m7.2132 889.46v2h1.8828l6.1172 3.0586v0.23438l-6.707 6.707h-1.293v2h2v-1.293l6.707-6.707h1.293v-2h-1.8828l-6.1172-3.0586v-0.94141z" color="#000000" fill="#4d4d4d" fill-rule="evenodd" stroke="#4d4d4d" stroke-width=".2"/>
|
|
182
|
+
<path id="polygon" d="m30 888.36v2h0.92773l-0.85547 12h-1.0723v2h2v-1.1992l8-1.6016v0.80078h2v-2h-0.77734l1.5547-7h1.2227v-2h-2v0.72656l-9-2.4531v-1.2734z" fill="#4d4d4d" fill-rule="evenodd" stroke="#4d4d4d" stroke-width=".2"/>
|
|
180
183
|
</g>
|
|
181
184
|
</svg>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<path d="M 16.0401,2.3158 H 2.005 v 14.0351 h 14.0351 z" fill="#ffffff" id="path1259" />
|
|
17
17
|
</mask>
|
|
18
18
|
</defs>
|
|
19
|
-
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="
|
|
19
|
+
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="3.8200527" inkscape:cx="86.517131" inkscape:cy="92.276214" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1920" inkscape:window-height="1011" 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">
|
|
20
20
|
<inkscape:grid type="xygrid" id="grid3004" empspacing="4" visible="true" enabled="true" snapvisiblegridlinesonly="true" originx="0" originy="0" spacingy="1" spacingx="1" units="px" />
|
|
21
21
|
<sodipodi:guide orientation="-1,0" position="24,168" id="guide3084" inkscape:locked="false" inkscape:label="" inkscape:color="rgb(0,134,229)" />
|
|
22
22
|
<sodipodi:guide orientation="0,1" position="0,96" id="guide3086" inkscape:locked="false" inkscape:label="" inkscape:color="rgb(0,134,229)" />
|
|
@@ -152,8 +152,8 @@
|
|
|
152
152
|
<rect style="fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:0.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="rect4243-2-5" width="2" height="2" x="89" y="901.36218" />
|
|
153
153
|
<path style="fill:#b3b3b3;fill-opacity:1;fill-rule:nonzero;stroke:#999999;stroke-width:0.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 131,937.3621 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-30-7" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccccccccccc" inkscape:label="delete-30" />
|
|
154
154
|
<path d="m 113.2903,943.46769 0.9072,0.5491 c 0.1786,0.10817 0.2366,0.34196 0.1294,0.52223 -0.0319,0.0535 -0.0764,0.0983 -0.1294,0.13055 l -7.00717,4.24121 -7.00708,-4.24121 c -0.17869,-0.10817 -0.236639,-0.34196 -0.12942,-0.52222 0.0319,-0.0536 0.0763,-0.0984 0.12942,-0.13056 l 0.90714,-0.5491 6.09994,3.69219 z m 0,3.57799 0.9072,0.5491 c 0.1786,0.1081 0.2366,0.3419 0.1294,0.5222 -0.0319,0.0535 -0.0764,0.0983 -0.1294,0.1306 l -6.61891,4.0061 c -0.239,0.1447 -0.53753,0.1447 -0.77652,0 l -6.61882,-4.0061 c -0.17869,-0.1082 -0.236639,-0.342 -0.12942,-0.5223 0.0319,-0.0536 0.0763,-0.0984 0.12942,-0.1305 l 0.90714,-0.5491 6.09994,3.6921 z m -5.71171,-10.57501 6.61891,4.00621 c 0.1786,0.10815 0.2366,0.34196 0.1294,0.52222 -0.0319,0.0536 -0.0764,0.0984 -0.1294,0.13056 l -7.00717,4.24119 -7.00708,-4.24119 c -0.17869,-0.10815 -0.236639,-0.34196 -0.12942,-0.52222 0.0319,-0.0536 0.0763,-0.0984 0.12942,-0.13056 l 6.61882,-4.00621 c 0.23899,-0.14465 0.53752,-0.14465 0.77652,0 z" fill="#4d4d4d" id="path437" style="fill:#f2f2f2;fill-opacity:1;stroke:#999999;stroke-width:0.178;stroke-dasharray:none;stroke-opacity:1" />
|
|
155
|
-
<path id="linestring" style="color:#000000;fill:#f2f2f2;fill-opacity:1;fill-rule:evenodd;stroke:#999999;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" d="m 7,
|
|
156
|
-
<path id="polygon" style="fill:#f2f2f2;fill-opacity:1;fill-rule:evenodd;stroke:#999999;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" d="m 29,
|
|
155
|
+
<path id="linestring" style="color:#000000;fill:#f2f2f2;fill-opacity:1;fill-rule:evenodd;stroke:#999999;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" d="m 7,889.36218 v 2 h 1.8828125 l 6.1171875,3.05859 v 0.23438 l -6.7070312,6.70703 h -1.2929688 v 2 h 2 v -1.29297 l 6.707031,-6.70703 h 1.292969 v -2 h -1.882812 l -6.117188,-3.05859 v -0.94141 z" />
|
|
156
|
+
<path id="polygon" style="fill:#f2f2f2;fill-opacity:1;fill-rule:evenodd;stroke:#999999;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" d="m 29,888.36218 v 2 h 0.927734 l -0.855468,12 h -1.072266 v 2 h 2 v -1.19922 l 8,-1.60156 v 0.80078 h 2 v -2 h -0.777344 l 1.554688,-7 h 1.222656 v -2 h -2 v 0.72656 l -9,-2.45312 v -1.27344 z" />
|
|
157
157
|
<path id="marker" d="m 84,936.36218 c -2.625,0 -5.25,1.70216 -6,5.1064 0,2.04256 1.5,6.12768 6,10.8936 4.5,-4.76592 6,-8.85104 6,-10.8936 -0.75,-3.40424 -3.375,-5.1064 -6,-5.1064 z m 0,2.38304 c 1.656857,0 3,1.21928 3,2.72336 0,1.50408 -1.343143,2.72344 -3,2.72344 -1.656848,0 -3,-1.21936 -3,-2.72344 0,-1.50408 1.343152,-2.72336 3,-2.72336 z" style="fill:#f2f2f2;fill-opacity:1;stroke:#999999;stroke-width:0.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" inkscape:connector-curvature="0" />
|
|
158
158
|
<g transform="matrix(0.16294606,0,0,0.16295934,27.835262,912.23132)" id="settings" style="fill:#f2f2f2;fill-opacity:1;stroke:#999999;stroke-width:1.49736;stroke-miterlimit:4;stroke-dasharray:none" class="sprite">
|
|
159
159
|
<path inkscape:connector-curvature="0" d="M 98.762,43.652 C 98.576,42.266 97.281,41.07 95.886,40.993 l -6.172,-0.337 c -1.395,-0.076 -2.899,-1.224 -3.341,-2.55 l -2.28,-5.518 c -0.629,-1.249 -0.379,-3.121 0.553,-4.161 l 4.122,-4.6 c 0.933,-1.042 0.962,-2.77 0.066,-3.842 l -8.813,-8.813 c -1.073,-0.897 -2.803,-0.867 -3.845,0.065 l -4.598,4.122 c -1.039,0.934 -2.915,1.182 -4.161,0.551 l -5.521,-2.279 c -1.324,-0.442 -2.472,-1.945 -2.549,-3.34 L 59.01,4.121 C 58.933,2.725 57.738,1.43 56.351,1.243 c 0,0 -3.252,-0.44 -6.248,-0.44 -2.991,0 -6.243,0.44 -6.243,0.44 -1.386,0.188 -2.582,1.483 -2.658,2.878 l -0.338,6.17 c -0.076,1.396 -1.224,2.898 -2.551,3.34 l -5.517,2.279 c -1.249,0.631 -3.122,0.382 -4.161,-0.551 l -4.601,-4.122 c -1.042,-0.932 -2.769,-0.962 -3.842,-0.065 l -8.813,8.813 c -0.897,1.073 -0.867,2.801 0.066,3.842 l 4.122,4.6 c 0.933,1.041 1.182,2.913 0.551,4.161 l -2.279,5.518 c -0.442,1.326 -1.946,2.474 -3.34,2.55 l -6.17,0.337 c -1.396,0.077 -2.691,1.272 -2.879,2.659 0,0 -0.439,3.253 -0.439,6.243 0,2.99 0.44,6.24 0.44,6.24 0.188,1.389 1.483,2.582 2.879,2.659 l 6.169,0.339 c 1.396,0.075 2.898,1.225 3.341,2.549 l 2.278,5.517 c 0.631,1.248 0.381,3.122 -0.551,4.163 l -4.122,4.598 c -0.933,1.042 -0.963,2.771 -0.066,3.845 l 8.814,8.813 c 1.073,0.896 2.801,0.866 3.842,-0.066 l 4.6,-4.122 c 1.041,-0.932 2.913,-1.182 4.161,-0.553 l 5.517,2.28 c 1.327,0.441 2.475,1.946 2.55,3.343 l 0.338,6.168 c 0.076,1.395 1.272,2.692 2.658,2.88 0,0 3.252,0.439 6.244,0.439 2.996,0 6.25,-0.439 6.25,-0.439 1.385,-0.188 2.58,-1.485 2.657,-2.88 L 59.347,89.5 c 0.077,-1.396 1.225,-2.901 2.551,-3.343 l 5.517,-2.28 c 1.248,-0.629 3.122,-0.379 4.163,0.553 l 4.598,4.122 c 1.042,0.933 2.771,0.964 3.843,0.067 l 8.815,-8.814 C 89.73,78.732 89.7,77.002 88.768,75.96 l -4.122,-4.598 c -0.932,-1.041 -1.182,-2.915 -0.553,-4.163 l 2.28,-5.517 c 0.441,-1.324 1.946,-2.474 3.341,-2.549 l 6.172,-0.339 c 1.395,-0.077 2.692,-1.271 2.876,-2.659 0,0 0.441,-3.25 0.441,-6.24 0,-2.99 -0.441,-6.243 -0.441,-6.243 z M 50.104,62.361 c -6.886,0 -12.468,-5.585 -12.468,-12.467 0,-6.885 5.582,-12.467 12.468,-12.467 6.89,0 12.475,5.582 12.475,12.467 -10e-4,6.882 -5.586,12.467 -12.475,12.467 z" id="path27812" style="fill:#f2f2f2;fill-opacity:1;stroke:#999999;stroke-width:1.49736;stroke-miterlimit:4;stroke-dasharray:none" />
|
|
@@ -211,5 +211,12 @@
|
|
|
211
211
|
<path style="fill:#f2f2f2;stroke:#999999;stroke-width:0.25;paint-order:fill markers stroke" d="m 8.1902877,37.423896 c -0.4872187,-0.174113 -0.7923051,-0.442073 -0.9946703,-0.873627 l -0.1907982,-0.406887 -1.3702708,-0.0034 c -1.4982701,-0.0037 -1.5910875,-0.03214 -1.5406237,-0.47225 l 0.026557,-0.23161 1.4211632,-0.02255 1.4211632,-0.02255 0.1982698,-0.389502 c 0.347892,-0.683434 0.8634941,-1.009111 1.592299,-1.005764 0.7177082,0.0033 1.3415151,0.432422 1.6290831,1.120669 l 0.116359,0.278485 h 4.65745 c 4.520341,0 4.659962,0.0047 4.742759,0.159402 0.1159,0.216562 0.107667,0.300926 -0.04419,0.452784 -0.114657,0.114657 -0.660626,0.129501 -4.763204,0.129501 h -4.633703 l -0.104975,0.290304 c -0.152574,0.421935 -0.6274874,0.844474 -1.1103021,0.987854 -0.4962156,0.147361 -0.6614998,0.148792 -1.0523644,0.0091 z m 0.9689602,-0.845129 c 0.6980003,-0.331223 0.6980003,-1.377155 0,-1.708378 -0.3515556,-0.166824 -0.4925823,-0.168492 -0.8270409,-0.0098 -0.3376099,0.160207 -0.5444962,0.513326 -0.5444962,0.929363 0,0.368008 0.1600657,0.606145 0.5356626,0.796928 0.3157622,0.16039 0.4841923,0.158752 0.8358745,-0.0081 z" id="path8" transform="translate(0,812.36218)" />
|
|
212
212
|
<path style="fill:#f2f2f2;stroke:#999999;stroke-width:0.25;paint-order:fill markers stroke" d="m 12.773494,42.243521 c -0.4045,-0.187277 -0.732456,-0.526846 -0.902897,-0.934868 l -0.128748,-0.308213 -3.8106837,-0.02143 -3.8106834,-0.02142 -0.026557,-0.23161 c -0.055311,-0.482381 -0.1677415,-0.468805 3.8892984,-0.469606 l 3.7189457,-7.33e-4 0.21287,-0.431917 c 0.651632,-1.322166 2.472575,-1.284611 3.125651,0.06446 l 0.178591,0.36892 h 2.297219 c 2.258426,0 2.298803,0.003 2.391007,0.175244 0.06808,0.127207 0.06936,0.228859 0.0047,0.370843 l -0.08912,0.1956 h -2.305381 -2.30538 l -0.15493,0.350241 c -0.387132,0.875164 -1.437261,1.286451 -2.283867,0.894485 z m 1.063202,-0.700358 c 0.378023,-0.157949 0.544298,-0.425794 0.541165,-0.871741 -0.004,-0.573585 -0.363385,-0.908772 -0.974299,-0.908772 -0.312041,0 -0.40386,0.04292 -0.649922,0.303826 -0.257768,0.273313 -0.282484,0.339859 -0.246104,0.662621 0.04524,0.401361 0.228194,0.651219 0.595596,0.813394 0.317179,0.140006 0.399909,0.140082 0.733564,6.68e-4 z" id="path9" transform="translate(0,812.36218)" />
|
|
213
213
|
<path style="color:#000000;fill:#f2f2f2;fill-opacity:1;fill-rule:evenodd;stroke:#999999;stroke-width:0.25;stroke-dasharray:none;stroke-opacity:1" d="m 154.67579,963.53902 4.73437,4.73437 -5.05078,4.6836 -1.35938,-1.4668 3.52735,-3.26953 -3.26563,-3.26563 z" id="path1-67-5" />
|
|
214
|
+
<path id="copy" style="fill:#f2f2f2;paint-order:fill markers stroke;fill-opacity:1" d="m 58,914.36218 v 3.5 h 4 v 4 h 3.5 v -7.5 z m -4,4 v 7.5 h 7.5 v -7.5 z" />
|
|
215
|
+
<g id="g1-5" transform="translate(0.1,0.1)">
|
|
216
|
+
<g id="g24">
|
|
217
|
+
<path d="m 12,912.36218 c -4.4182692,0 -8,3.58172 -8,8 0.00463,1.61557 0.4982915,3.19189 1.4160156,4.52148 0.1980248,0.28729 0.4146342,0.56131 0.6484375,0.82032 1.5128357,1.68659 3.6698868,2.65261 5.9355469,2.6582 2.266949,-0.006 4.424914,-0.97357 5.9375,-2.66211 0.23535,-0.26077 0.45327,-0.53676 0.652344,-0.82617 0.913769,-1.32754 1.405284,-2.9001 1.410156,-4.51172 0,-4.41828 -3.58173,-8 -8,-8 z m -5.3242188,12.50586 c 1.3285496,-1.56088 3.274489,-2.46104 5.3242188,-2.46289 2.050412,10e-4 3.997179,0.90149 5.326172,2.46289 0,0 -0.0035,-0.003 0.0059,0.006 0,0 -0.537098,0.5762 -0.839844,0.82812 -0.175326,0.14821 -0.35784,0.2877 -0.546874,0.41797 -0.06626,0.0467 -0.133328,0.0923 -0.201172,0.13672 -0.244804,0.15763 -0.499205,0.29983 -0.761719,0.42578 -0.931874,0.44366 -1.950332,0.67577 -2.982422,0.67969 -0.618083,-0.005 -1.232807,-0.0915 -1.828125,-0.25781 -0.6753225,-0.18416 -1.3192066,-0.46858 -1.9101562,-0.84375 -0.0685,-0.0444 -0.1362192,-0.09 -0.203125,-0.13672 -0.00521,-0.004 -0.010422,-0.008 -0.015625,-0.0117 -0.1876607,-0.12974 -0.3688672,-0.26858 -0.5429688,-0.41602 -0.2997188,-0.24977 -0.5780329,-0.52416 -0.8320313,-0.82031 m -0.5917968,-0.81445 c -0.6976631,-1.10814 -1.0705109,-2.38976 -1.0761719,-3.69922 0,-3.86599 3.1340146,-7 7,-7 l -4.1e-5,-1.6e-4 c 3.865985,0 7,3.13401 7,7 -0.0054,1.30234 -0.374061,2.57734 -1.064453,3.68164 -1.516341,-1.67935 -3.672913,-2.63806 -5.935547,-2.63867 -2.2612709,0.008 -4.4133749,0.97341 -5.9238281,2.65625" style="fill:#f2f2f2;stroke:#999999;stroke-width:0.2;paint-order:fill markers stroke" id="path24" sodipodi:nodetypes="scccccccsccccccccccccccccccccccc" />
|
|
218
|
+
<path id="path11" style="fill:#f2f2f2;stroke:#999999;stroke-width:0.2;stroke-dasharray:none;paint-order:fill markers stroke" d="m 12,914.86218 a 2.5,2.5 0 0 0 -2.5,2.5 2.5,2.5 0 0 0 2.5,2.5 2.5,2.5 0 0 0 2.5,-2.5 2.5,2.5 0 0 0 -2.5,-2.5 z m 0,1 a 1.5,1.5 0 0 1 1.5,1.5 1.5,1.5 0 0 1 -1.5,1.5 1.5,1.5 0 0 1 -1.5,-1.5 1.5,1.5 0 0 1 1.5,-1.5 z" />
|
|
219
|
+
</g>
|
|
220
|
+
</g>
|
|
214
221
|
</g>
|
|
215
222
|
</svg>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<path d="M 16.0401,2.3158 H 2.005 v 14.0351 h 14.0351 z" fill="#ffffff" id="path2351" />
|
|
11
11
|
</mask>
|
|
12
12
|
</defs>
|
|
13
|
-
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="
|
|
13
|
+
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="11.453294" inkscape:cx="35.099072" inkscape:cy="84.298891" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1920" inkscape:window-height="1011" 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">
|
|
14
14
|
<inkscape:grid type="xygrid" id="grid3004" empspacing="4" visible="true" enabled="true" snapvisiblegridlinesonly="true" originx="0" originy="0" spacingy="1" spacingx="1" units="px" />
|
|
15
15
|
<sodipodi:guide orientation="-1,0" position="24,168" id="guide3084" inkscape:locked="false" inkscape:label="" inkscape:color="rgb(0,134,229)" />
|
|
16
16
|
<sodipodi:guide orientation="0,1" position="0,120" id="guide3086" inkscape:locked="false" inkscape:label="" inkscape:color="rgb(0,134,229)" />
|
|
@@ -196,5 +196,8 @@
|
|
|
196
196
|
<path fill-rule="evenodd" clip-rule="evenodd" d="m 87.166638,966.62162 -3.166579,-2.99638 -3.166613,2.99638 -0.833375,-0.78858 3.4333,-3.24873 c 0.312979,-0.29613 0.82041,-0.29613 1.133389,0 l 3.43324,3.24873 z m -6.333275,3.48122 3.166626,2.99639 3.166649,-2.99639 0.833362,0.78859 -3.433322,3.24872 c -0.312968,0.29608 -0.820411,0.29608 -1.133378,0 l -3.4333,-3.24872 z" fill="#efefef" id="path1-675" style="stroke-width:0.999996;fill:#464646;fill-opacity:1" />
|
|
197
197
|
<path style="fill:#464646;fill-opacity:1;stroke-width:0.999996" d="m 63.166637,974.36218 -3.166626,-2.99639 -3.166649,2.99639 -0.833362,-0.78859 3.433322,-3.24872 c 0.312968,-0.29608 0.820411,-0.29608 1.133378,0 l 3.4333,3.24872 z" id="path5" />
|
|
198
198
|
<path style="fill:#464646;fill-opacity:1;stroke-width:0.999996" d="m 56.000071,963.15076 3.43324,3.24873 c 0.312979,0.29613 0.82041,0.29613 1.133389,0 l 3.4333,-3.24873 -0.833375,-0.78858 -3.166613,2.99638 -3.166579,-2.99638 z" id="path1-675-2" />
|
|
199
|
+
<text xml:space="preserve" style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" x="5.9999995" y="897.90784" id="text4457"><tspan y="897.90784" x="5.9999995" sodipodi:role="line" id="tspan4459" style="font-size:40px;line-height:1.25;font-family:sans-serif"> </tspan></text>
|
|
200
|
+
<path id="linestring" style="color:#000000;fill:#4d4d4d;fill-opacity:1;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" d="m 7.213203,889.46218 v 2 h 1.8828125 l 6.1171875,3.05859 v 0.23438 l -6.7070312,6.70703 h -1.2929688 v 2 h 2 v -1.29297 l 6.707031,-6.70703 h 1.292969 v -2 h -1.882812 l -6.117188,-3.05859 v -0.94141 z" />
|
|
201
|
+
<path id="polygon" style="fill:#4d4d4d;fill-opacity:1;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" d="m 30,888.36218 v 2 h 0.927734 l -0.855468,12 h -1.072266 v 2 h 2 v -1.19922 l 8,-1.60156 v 0.80078 h 2 v -2 h -0.777344 l 1.554688,-7 h 1.222656 v -2 h -2 v 0.72656 l -9,-2.45312 v -1.27344 z" />
|
|
199
202
|
</g>
|
|
200
203
|
</svg>
|
|
@@ -249,6 +249,10 @@ export class BaseAjax extends BaseAutocomplete {
|
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
+
buildUrl(value) {
|
|
253
|
+
return Util.template(this.url, { q: encodeURIComponent(value) })
|
|
254
|
+
}
|
|
255
|
+
|
|
252
256
|
async search() {
|
|
253
257
|
let val = this.input.value
|
|
254
258
|
if (val.length < this.options.minChar) {
|
|
@@ -258,7 +262,7 @@ export class BaseAjax extends BaseAutocomplete {
|
|
|
258
262
|
if (val === this.cache) return
|
|
259
263
|
this.cache = val
|
|
260
264
|
val = val.toLowerCase()
|
|
261
|
-
const url =
|
|
265
|
+
const url = this.buildUrl(val)
|
|
262
266
|
this.handleResults(await this._search(url))
|
|
263
267
|
}
|
|
264
268
|
|
|
@@ -309,7 +313,7 @@ export const SingleMixin = (Base) =>
|
|
|
309
313
|
DomEvent.on(close, 'click', () => {
|
|
310
314
|
this.selectedContainer.innerHTML = ''
|
|
311
315
|
this.input.style.display = 'block'
|
|
312
|
-
this.options.on_unselect(result)
|
|
316
|
+
this.options.on_unselect?.(result)
|
|
313
317
|
})
|
|
314
318
|
this.hide()
|
|
315
319
|
}
|
|
@@ -338,7 +342,7 @@ export const MultipleMixin = (Base) =>
|
|
|
338
342
|
})
|
|
339
343
|
DomEvent.on(close, 'click', () => {
|
|
340
344
|
this.selectedContainer.removeChild(result_el)
|
|
341
|
-
this.options.on_unselect(result)
|
|
345
|
+
this.options.on_unselect?.(result)
|
|
342
346
|
})
|
|
343
347
|
this.hide()
|
|
344
348
|
}
|
|
@@ -32,7 +32,11 @@ export default class Browser {
|
|
|
32
32
|
'show-on-edit icon-delete',
|
|
33
33
|
translate('Delete this feature')
|
|
34
34
|
)
|
|
35
|
-
const colorBox = DomUtil.create(
|
|
35
|
+
const colorBox = DomUtil.create(
|
|
36
|
+
'i',
|
|
37
|
+
`icon icon-16 icon-${feature.getClassName()} feature-color`,
|
|
38
|
+
row
|
|
39
|
+
)
|
|
36
40
|
const title = DomUtil.create('span', 'feature-title', row)
|
|
37
41
|
const symbol = feature._getIconUrl
|
|
38
42
|
? Icon.formatUrl(feature._getIconUrl(), feature)
|
|
@@ -43,6 +47,8 @@ export default class Browser {
|
|
|
43
47
|
if (symbol && symbol !== U.SCHEMA.iconUrl.default) {
|
|
44
48
|
const icon = Icon.makeElement(symbol, colorBox)
|
|
45
49
|
Icon.setContrast(icon, colorBox, symbol, bgcolor)
|
|
50
|
+
} else if (DomUtil.contrastedColor(colorBox, bgcolor)) {
|
|
51
|
+
colorBox.classList.add('icon-white')
|
|
46
52
|
}
|
|
47
53
|
const viewFeature = (e) => {
|
|
48
54
|
feature.zoomTo({ ...e, callback: () => feature.view() })
|
|
@@ -19,7 +19,12 @@ export default class Caption {
|
|
|
19
19
|
open() {
|
|
20
20
|
const container = DomUtil.create('div', 'umap-caption')
|
|
21
21
|
const hgroup = DomUtil.element({ tagName: 'hgroup', parent: container })
|
|
22
|
-
DomUtil.createTitle(
|
|
22
|
+
DomUtil.createTitle(
|
|
23
|
+
hgroup,
|
|
24
|
+
this.map.getDisplayName(),
|
|
25
|
+
'icon-caption icon-block',
|
|
26
|
+
'map-name'
|
|
27
|
+
)
|
|
23
28
|
this.map.addAuthorLink('h4', hgroup)
|
|
24
29
|
if (this.map.options.description) {
|
|
25
30
|
const description = DomUtil.element({
|
|
@@ -103,11 +103,11 @@ class Feature {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
pushGeometry() {
|
|
106
|
-
this.
|
|
106
|
+
this._setLatLngs(this.toLatLngs())
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
pullGeometry(sync = true) {
|
|
110
|
-
this.fromLatLngs(this.
|
|
110
|
+
this.fromLatLngs(this._getLatLngs())
|
|
111
111
|
if (sync) {
|
|
112
112
|
this.sync.update('geometry', this.geometry)
|
|
113
113
|
}
|
|
@@ -596,6 +596,55 @@ class Feature {
|
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
+
|
|
600
|
+
getContextMenuItems(event) {
|
|
601
|
+
const permalink = this.getPermalink()
|
|
602
|
+
let items = []
|
|
603
|
+
if (permalink) {
|
|
604
|
+
items.push({
|
|
605
|
+
label: translate('Permalink'),
|
|
606
|
+
action: () => {
|
|
607
|
+
window.open(permalink)
|
|
608
|
+
},
|
|
609
|
+
})
|
|
610
|
+
}
|
|
611
|
+
items.push({
|
|
612
|
+
label: translate('Copy as GeoJSON'),
|
|
613
|
+
action: () => {
|
|
614
|
+
L.Util.copyToClipboard(JSON.stringify(this.toGeoJSON()))
|
|
615
|
+
this.map.tooltip.open({ content: L._('✅ Copied!') })
|
|
616
|
+
},
|
|
617
|
+
})
|
|
618
|
+
if (this.map.editEnabled && !this.isReadOnly()) {
|
|
619
|
+
items = items.concat(this.getContextMenuEditItems(event))
|
|
620
|
+
}
|
|
621
|
+
return items
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
getContextMenuEditItems() {
|
|
625
|
+
let items = ['-']
|
|
626
|
+
if (this.map.editedFeature !== this) {
|
|
627
|
+
items.push({
|
|
628
|
+
label: `${translate('Edit this feature')} (⇧+Click)`,
|
|
629
|
+
action: () => this.edit(),
|
|
630
|
+
})
|
|
631
|
+
}
|
|
632
|
+
items = items.concat(
|
|
633
|
+
{
|
|
634
|
+
label: this.map.help.displayLabel('EDIT_FEATURE_LAYER'),
|
|
635
|
+
action: () => this.datalayer.edit(),
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
label: translate('Delete this feature'),
|
|
639
|
+
action: () => this.confirmDelete(),
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
label: translate('Clone this feature'),
|
|
643
|
+
action: () => this.clone(),
|
|
644
|
+
}
|
|
645
|
+
)
|
|
646
|
+
return items
|
|
647
|
+
}
|
|
599
648
|
}
|
|
600
649
|
|
|
601
650
|
export class Point extends Feature {
|
|
@@ -607,6 +656,14 @@ export class Point extends Feature {
|
|
|
607
656
|
}
|
|
608
657
|
}
|
|
609
658
|
|
|
659
|
+
_getLatLngs() {
|
|
660
|
+
return this.ui.getLatLng()
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
_setLatLngs(latlng) {
|
|
664
|
+
this.ui.setLatLng(latlng)
|
|
665
|
+
}
|
|
666
|
+
|
|
610
667
|
toLatLngs() {
|
|
611
668
|
return GeoJSON.coordsToLatLng(this.coordinates)
|
|
612
669
|
}
|
|
@@ -655,6 +712,7 @@ export class Point extends Feature {
|
|
|
655
712
|
builder.restoreField('ui._latlng.lat')
|
|
656
713
|
builder.restoreField('ui._latlng.lng')
|
|
657
714
|
}
|
|
715
|
+
this.pullGeometry()
|
|
658
716
|
this.zoomTo({ easing: false })
|
|
659
717
|
},
|
|
660
718
|
})
|
|
@@ -677,6 +735,14 @@ class Path extends Feature {
|
|
|
677
735
|
return !this.isEmpty()
|
|
678
736
|
}
|
|
679
737
|
|
|
738
|
+
_getLatLngs() {
|
|
739
|
+
return this.ui.getLatLngs()
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
_setLatLngs(latlngs) {
|
|
743
|
+
this.ui.setLatLngs(latlngs)
|
|
744
|
+
}
|
|
745
|
+
|
|
680
746
|
connectToDataLayer(datalayer) {
|
|
681
747
|
super.connectToDataLayer(datalayer)
|
|
682
748
|
// We keep markers on their own layer on top of the paths.
|
|
@@ -767,6 +833,62 @@ class Path extends Feature {
|
|
|
767
833
|
}
|
|
768
834
|
if (callback) callback.call(this)
|
|
769
835
|
}
|
|
836
|
+
|
|
837
|
+
getContextMenuItems(event) {
|
|
838
|
+
const items = super.getContextMenuItems(event)
|
|
839
|
+
items.push({
|
|
840
|
+
label: translate('Display measure'),
|
|
841
|
+
action: () => Alert.info(this.ui.getMeasure()),
|
|
842
|
+
})
|
|
843
|
+
if (this.map.editEnabled && !this.isReadOnly() && this.isMulti()) {
|
|
844
|
+
items.push(...this.getContextMenuMultiItems(event))
|
|
845
|
+
}
|
|
846
|
+
return items
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
getContextMenuMultiItems(event) {
|
|
850
|
+
const items = [
|
|
851
|
+
'-',
|
|
852
|
+
{
|
|
853
|
+
label: translate('Remove shape from the multi'),
|
|
854
|
+
action: () => {
|
|
855
|
+
this.ui.enableEdit().deleteShapeAt(event.latlng)
|
|
856
|
+
},
|
|
857
|
+
},
|
|
858
|
+
]
|
|
859
|
+
const shape = this.ui.shapeAt(event.latlng)
|
|
860
|
+
if (this.ui._latlngs.indexOf(shape) > 0) {
|
|
861
|
+
items.push({
|
|
862
|
+
label: translate('Make main shape'),
|
|
863
|
+
action: () => {
|
|
864
|
+
this.ui.enableEdit().deleteShape(shape)
|
|
865
|
+
this.ui.editor.prependShape(shape)
|
|
866
|
+
},
|
|
867
|
+
})
|
|
868
|
+
}
|
|
869
|
+
return items
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
getContextMenuEditItems(event) {
|
|
873
|
+
const items = super.getContextMenuEditItems(event)
|
|
874
|
+
if (this.map?.editedFeature !== this && this.isSameClass(this.map.editedFeature)) {
|
|
875
|
+
items.push({
|
|
876
|
+
label: translate('Transfer shape to edited feature'),
|
|
877
|
+
action: () => {
|
|
878
|
+
this.transferShape(event.latlng, this.map.editedFeature)
|
|
879
|
+
},
|
|
880
|
+
})
|
|
881
|
+
}
|
|
882
|
+
if (this.isMulti()) {
|
|
883
|
+
items.push({
|
|
884
|
+
label: translate('Extract shape to separate feature'),
|
|
885
|
+
action: () => {
|
|
886
|
+
this.ui.isolateShape(event.latlng)
|
|
887
|
+
},
|
|
888
|
+
})
|
|
889
|
+
}
|
|
890
|
+
return items
|
|
891
|
+
}
|
|
770
892
|
}
|
|
771
893
|
|
|
772
894
|
export class LineString extends Path {
|
|
@@ -881,6 +1003,41 @@ export class LineString extends Path {
|
|
|
881
1003
|
isMulti() {
|
|
882
1004
|
return !LineUtil.isFlat(this.coordinates) && this.coordinates.length > 1
|
|
883
1005
|
}
|
|
1006
|
+
|
|
1007
|
+
getContextMenuEditItems(event) {
|
|
1008
|
+
const items = super.getContextMenuEditItems(event)
|
|
1009
|
+
const vertexClicked = event.vertex
|
|
1010
|
+
if (!this.isMulti()) {
|
|
1011
|
+
items.push({
|
|
1012
|
+
label: translate('Transform to polygon'),
|
|
1013
|
+
action: () => this.toPolygon(),
|
|
1014
|
+
})
|
|
1015
|
+
}
|
|
1016
|
+
if (vertexClicked) {
|
|
1017
|
+
const index = event.vertex.getIndex()
|
|
1018
|
+
if (index !== 0 && index !== event.vertex.getLastIndex()) {
|
|
1019
|
+
items.push({
|
|
1020
|
+
label: translate('Split line'),
|
|
1021
|
+
action: () => event.vertex.split(),
|
|
1022
|
+
})
|
|
1023
|
+
} else if (index === 0 || index === event.vertex.getLastIndex()) {
|
|
1024
|
+
items.push({
|
|
1025
|
+
label: this.map.help.displayLabel('CONTINUE_LINE'),
|
|
1026
|
+
action: () => event.vertex.continue(),
|
|
1027
|
+
})
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
return items
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
getContextMenuMultiItems(event) {
|
|
1034
|
+
const items = super.getContextMenuMultiItems(event)
|
|
1035
|
+
items.push({
|
|
1036
|
+
label: translate('Merge lines'),
|
|
1037
|
+
action: () => this.mergeShapes(),
|
|
1038
|
+
})
|
|
1039
|
+
return items
|
|
1040
|
+
}
|
|
884
1041
|
}
|
|
885
1042
|
|
|
886
1043
|
export class Polygon extends Path {
|
|
@@ -991,4 +1148,21 @@ export class Polygon extends Path {
|
|
|
991
1148
|
items.push(U.CreateHoleAction)
|
|
992
1149
|
return items
|
|
993
1150
|
}
|
|
1151
|
+
|
|
1152
|
+
getContextMenuEditItems(event) {
|
|
1153
|
+
const items = super.getContextMenuEditItems(event)
|
|
1154
|
+
const shape = this.ui.shapeAt(event.latlng)
|
|
1155
|
+
// No multi and no holes.
|
|
1156
|
+
if (shape && !this.isMulti() && (LineUtil.isFlat(shape) || shape.length === 1)) {
|
|
1157
|
+
items.push({
|
|
1158
|
+
label: translate('Transform to lines'),
|
|
1159
|
+
action: () => this.toLineString(),
|
|
1160
|
+
})
|
|
1161
|
+
}
|
|
1162
|
+
items.push({
|
|
1163
|
+
label: translate('Start a hole here'),
|
|
1164
|
+
action: () => this.ui.startHole(event),
|
|
1165
|
+
})
|
|
1166
|
+
return items
|
|
1167
|
+
}
|
|
994
1168
|
}
|
|
@@ -92,12 +92,12 @@ export class DataLayer {
|
|
|
92
92
|
set isDirty(status) {
|
|
93
93
|
this._isDirty = status
|
|
94
94
|
if (status) {
|
|
95
|
-
this.map.
|
|
95
|
+
this.map.isDirty = true
|
|
96
96
|
// A layer can be made dirty by indirect action (like dragging layers)
|
|
97
97
|
// we need to have it loaded before saving it.
|
|
98
98
|
if (!this.isLoaded()) this.fetchData()
|
|
99
99
|
} else {
|
|
100
|
-
this.map.
|
|
100
|
+
this.map.checkDirty()
|
|
101
101
|
this.isDeleted = false
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -339,11 +339,11 @@ export class DataLayer {
|
|
|
339
339
|
const id = stamp(this)
|
|
340
340
|
if (!this.map.datalayers[id]) {
|
|
341
341
|
this.map.datalayers[id] = this
|
|
342
|
-
if (!this.map.datalayers_index.includes(this)) {
|
|
343
|
-
this.map.datalayers_index.push(this)
|
|
344
|
-
}
|
|
345
|
-
this.map.onDataLayersChanged()
|
|
346
342
|
}
|
|
343
|
+
if (!this.map.datalayers_index.includes(this)) {
|
|
344
|
+
this.map.datalayers_index.push(this)
|
|
345
|
+
}
|
|
346
|
+
this.map.onDataLayersChanged()
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
_dataUrl() {
|
|
@@ -559,7 +559,6 @@ export class DataLayer {
|
|
|
559
559
|
|
|
560
560
|
erase() {
|
|
561
561
|
this.hide()
|
|
562
|
-
delete this.map.datalayers[stamp(this)]
|
|
563
562
|
this.map.datalayers_index.splice(this.getRank(), 1)
|
|
564
563
|
this.parentPane.removeChild(this.pane)
|
|
565
564
|
this.map.onDataLayersChanged()
|
|
@@ -716,7 +715,7 @@ export class DataLayer {
|
|
|
716
715
|
const remoteDataFields = [
|
|
717
716
|
[
|
|
718
717
|
'options.remoteData.url',
|
|
719
|
-
{ handler: 'Url', label: translate('Url'), helpEntries: 'formatURL' },
|
|
718
|
+
{ handler: 'Url', label: translate('Url'), helpEntries: ['formatURL'] },
|
|
720
719
|
],
|
|
721
720
|
[
|
|
722
721
|
'options.remoteData.format',
|
|
@@ -729,7 +728,7 @@ export class DataLayer {
|
|
|
729
728
|
{
|
|
730
729
|
handler: 'Switch',
|
|
731
730
|
label: translate('Dynamic'),
|
|
732
|
-
helpEntries: 'dynamicRemoteData',
|
|
731
|
+
helpEntries: ['dynamicRemoteData'],
|
|
733
732
|
},
|
|
734
733
|
],
|
|
735
734
|
[
|
|
@@ -746,7 +745,7 @@ export class DataLayer {
|
|
|
746
745
|
{
|
|
747
746
|
handler: 'Switch',
|
|
748
747
|
label: translate('Proxy request'),
|
|
749
|
-
helpEntries: 'proxyRemoteData',
|
|
748
|
+
helpEntries: ['proxyRemoteData'],
|
|
750
749
|
},
|
|
751
750
|
])
|
|
752
751
|
remoteDataFields.push('options.remoteData.ttl')
|
|
@@ -874,18 +873,21 @@ export class DataLayer {
|
|
|
874
873
|
|
|
875
874
|
async restore(version) {
|
|
876
875
|
if (!this.map.editEnabled) return
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
876
|
+
this.map.dialog
|
|
877
|
+
.confirm(translate('Are you sure you want to restore this version?'))
|
|
878
|
+
.then(async () => {
|
|
879
|
+
const [geojson, response, error] = await this.map.server.get(
|
|
880
|
+
this.getVersionUrl(version)
|
|
881
|
+
)
|
|
882
|
+
if (!error) {
|
|
883
|
+
if (geojson._storage) geojson._umap_options = geojson._storage // Retrocompat.
|
|
884
|
+
if (geojson._umap_options) this.setOptions(geojson._umap_options)
|
|
885
|
+
this.empty()
|
|
886
|
+
if (this.isRemoteLayer()) this.fetchRemoteData()
|
|
887
|
+
else this.addData(geojson)
|
|
888
|
+
this.isDirty = true
|
|
889
|
+
}
|
|
890
|
+
})
|
|
889
891
|
}
|
|
890
892
|
|
|
891
893
|
featuresToGeoJSON() {
|
|
@@ -1026,7 +1028,7 @@ export class DataLayer {
|
|
|
1026
1028
|
}
|
|
1027
1029
|
|
|
1028
1030
|
async save() {
|
|
1029
|
-
if (this.isDeleted) return this.saveDelete()
|
|
1031
|
+
if (this.isDeleted) return await this.saveDelete()
|
|
1030
1032
|
if (!this.isLoaded()) {
|
|
1031
1033
|
return
|
|
1032
1034
|
}
|
|
@@ -1090,8 +1092,8 @@ export class DataLayer {
|
|
|
1090
1092
|
if (this.umap_id) {
|
|
1091
1093
|
await this.map.server.post(this.getDeleteUrl())
|
|
1092
1094
|
}
|
|
1095
|
+
delete this.map.datalayers[stamp(this)]
|
|
1093
1096
|
this.isDirty = false
|
|
1094
|
-
this.map.continueSaving()
|
|
1095
1097
|
}
|
|
1096
1098
|
|
|
1097
1099
|
getMap() {
|
|
@@ -1160,8 +1162,11 @@ export class DataLayer {
|
|
|
1160
1162
|
'click',
|
|
1161
1163
|
function () {
|
|
1162
1164
|
if (!this.isVisible()) return
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
+
this.map.dialog
|
|
1166
|
+
.confirm(translate('Are you sure you want to delete this layer?'))
|
|
1167
|
+
.then(() => {
|
|
1168
|
+
this._delete()
|
|
1169
|
+
})
|
|
1165
1170
|
},
|
|
1166
1171
|
this
|
|
1167
1172
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Uses globals for: csv2geojson, osmtogeojson
|
|
1
|
+
/* Uses globals for: csv2geojson, osmtogeojson (not available as ESM) */
|
|
2
2
|
import { translate } from './i18n.js'
|
|
3
3
|
|
|
4
4
|
export const EXPORT_FORMATS = {
|
|
@@ -115,7 +115,8 @@ export class Formatter {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
async fromGeoRSS(str) {
|
|
118
|
-
|
|
118
|
+
const GeoRSSToGeoJSON = await import('../../vendors/georsstogeojson/GeoRSSToGeoJSON.js')
|
|
119
|
+
return GeoRSSToGeoJSON.parse(this.toDom(str))
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
toDom(x) {
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from './autocomplete.js'
|
|
10
10
|
import Browser from './browser.js'
|
|
11
11
|
import Caption from './caption.js'
|
|
12
|
+
import ContextMenu from './ui/contextmenu.js'
|
|
12
13
|
import Facets from './facets.js'
|
|
13
14
|
import { Formatter } from './formatter.js'
|
|
14
15
|
import Help from './help.js'
|
|
@@ -43,6 +44,7 @@ window.U = {
|
|
|
43
44
|
AutocompleteDatalist,
|
|
44
45
|
Browser,
|
|
45
46
|
Caption,
|
|
47
|
+
ContextMenu,
|
|
46
48
|
DataLayer,
|
|
47
49
|
DataLayerPermissions,
|
|
48
50
|
Dialog,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DomUtil } from '../../../vendors/leaflet/leaflet-src.esm.js'
|
|
2
2
|
import { BaseAjax, SingleMixin } from '../autocomplete.js'
|
|
3
|
+
import * as Util from '../utils.js'
|
|
3
4
|
|
|
4
5
|
class Autocomplete extends SingleMixin(BaseAjax) {
|
|
5
6
|
createResult(item) {
|
|
@@ -8,6 +9,17 @@ class Autocomplete extends SingleMixin(BaseAjax) {
|
|
|
8
9
|
label: `${item.nom} (${item.code})`,
|
|
9
10
|
})
|
|
10
11
|
}
|
|
12
|
+
|
|
13
|
+
buildUrl(value) {
|
|
14
|
+
let url = this.url
|
|
15
|
+
let options = { q: encodeURIComponent(value) }
|
|
16
|
+
const re = /^(0[1-9]|[1-9][ABab\d])\d{3}$/gm
|
|
17
|
+
if (re.test(value)) {
|
|
18
|
+
url = "https://geo.api.gouv.fr/communes?code={code}&limit=5"
|
|
19
|
+
options = { code: encodeURIComponent(value) }
|
|
20
|
+
}
|
|
21
|
+
return Util.template(url, options)
|
|
22
|
+
}
|
|
11
23
|
}
|
|
12
24
|
|
|
13
25
|
export class Importer {
|
|
@@ -25,7 +37,7 @@ export class Importer {
|
|
|
25
37
|
textContent: "Importer les contours d'une commune française.",
|
|
26
38
|
})
|
|
27
39
|
const options = {
|
|
28
|
-
placeholder: '
|
|
40
|
+
placeholder: 'Nom ou code INSEE…',
|
|
29
41
|
url: 'https://geo.api.gouv.fr/communes?nom={q}&limit=5',
|
|
30
42
|
on_select: (choice) => {
|
|
31
43
|
importer.url = `https://geo.api.gouv.fr/communes?code=${choice.item.value}&format=geojson&geometry=contour`
|