umap-project 2.6.0__py3-none-any.whl → 2.6.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/locale/en/LC_MESSAGES/django.po +3 -3
- umap/locale/fa_IR/LC_MESSAGES/django.mo +0 -0
- umap/locale/fa_IR/LC_MESSAGES/django.po +9 -9
- umap/locale/hu/LC_MESSAGES/django.mo +0 -0
- umap/locale/hu/LC_MESSAGES/django.po +18 -18
- umap/settings/base.py +0 -6
- umap/static/umap/js/modules/autocomplete.js +9 -5
- umap/static/umap/js/modules/data/features.js +13 -12
- umap/static/umap/js/modules/data/layer.js +1 -1
- umap/static/umap/js/modules/importers/overpass.js +8 -22
- umap/static/umap/js/modules/rendering/ui.js +4 -41
- umap/static/umap/js/modules/rules.js +3 -16
- umap/static/umap/js/modules/schema.js +1 -1
- umap/static/umap/js/umap.controls.js +1 -2
- umap/static/umap/js/umap.forms.js +5 -9
- umap/static/umap/js/umap.js +2 -7
- umap/static/umap/locale/am_ET.js +2 -8
- umap/static/umap/locale/am_ET.json +2 -8
- umap/static/umap/locale/ar.js +2 -8
- umap/static/umap/locale/ar.json +2 -8
- umap/static/umap/locale/ast.js +2 -8
- umap/static/umap/locale/ast.json +2 -8
- umap/static/umap/locale/bg.js +2 -8
- umap/static/umap/locale/bg.json +2 -8
- umap/static/umap/locale/br.js +2 -8
- umap/static/umap/locale/br.json +2 -8
- umap/static/umap/locale/ca.js +12 -18
- umap/static/umap/locale/ca.json +12 -18
- umap/static/umap/locale/cs_CZ.js +2 -8
- umap/static/umap/locale/cs_CZ.json +2 -8
- umap/static/umap/locale/da.js +2 -8
- umap/static/umap/locale/da.json +2 -8
- umap/static/umap/locale/de.js +2 -8
- umap/static/umap/locale/de.json +2 -8
- umap/static/umap/locale/el.js +2 -8
- umap/static/umap/locale/el.json +2 -8
- umap/static/umap/locale/en.js +2 -4
- umap/static/umap/locale/en.json +2 -4
- umap/static/umap/locale/en_US.json +2 -8
- umap/static/umap/locale/es.js +2 -8
- umap/static/umap/locale/es.json +2 -8
- umap/static/umap/locale/et.js +2 -8
- umap/static/umap/locale/et.json +2 -8
- umap/static/umap/locale/eu.js +338 -346
- umap/static/umap/locale/eu.json +338 -346
- umap/static/umap/locale/fa_IR.js +365 -373
- umap/static/umap/locale/fa_IR.json +365 -373
- umap/static/umap/locale/fi.js +2 -8
- umap/static/umap/locale/fi.json +2 -8
- umap/static/umap/locale/fr.js +2 -4
- umap/static/umap/locale/fr.json +2 -4
- umap/static/umap/locale/gl.js +2 -8
- umap/static/umap/locale/gl.json +2 -8
- umap/static/umap/locale/he.js +2 -8
- umap/static/umap/locale/he.json +2 -8
- umap/static/umap/locale/hr.js +2 -8
- umap/static/umap/locale/hr.json +2 -8
- umap/static/umap/locale/hu.js +23 -31
- umap/static/umap/locale/hu.json +23 -31
- umap/static/umap/locale/id.js +2 -8
- umap/static/umap/locale/id.json +2 -8
- umap/static/umap/locale/is.js +2 -8
- umap/static/umap/locale/is.json +2 -8
- umap/static/umap/locale/it.js +2 -8
- umap/static/umap/locale/it.json +2 -8
- umap/static/umap/locale/ja.js +2 -8
- umap/static/umap/locale/ja.json +2 -8
- umap/static/umap/locale/ko.js +2 -8
- umap/static/umap/locale/ko.json +2 -8
- umap/static/umap/locale/lt.js +2 -8
- umap/static/umap/locale/lt.json +2 -8
- umap/static/umap/locale/ms.js +2 -8
- umap/static/umap/locale/ms.json +2 -8
- umap/static/umap/locale/nl.js +2 -8
- umap/static/umap/locale/nl.json +2 -8
- umap/static/umap/locale/no.js +2 -8
- umap/static/umap/locale/no.json +2 -8
- umap/static/umap/locale/pl.js +48 -54
- umap/static/umap/locale/pl.json +48 -54
- umap/static/umap/locale/pl_PL.json +2 -8
- umap/static/umap/locale/pt.js +2 -8
- umap/static/umap/locale/pt.json +2 -8
- umap/static/umap/locale/pt_BR.js +2 -8
- umap/static/umap/locale/pt_BR.json +2 -8
- umap/static/umap/locale/pt_PT.js +2 -8
- umap/static/umap/locale/pt_PT.json +2 -8
- umap/static/umap/locale/ro.js +2 -8
- umap/static/umap/locale/ro.json +2 -8
- umap/static/umap/locale/ru.js +2 -8
- umap/static/umap/locale/ru.json +2 -8
- umap/static/umap/locale/sk_SK.js +2 -8
- umap/static/umap/locale/sk_SK.json +2 -8
- umap/static/umap/locale/sl.js +2 -8
- umap/static/umap/locale/sl.json +2 -8
- umap/static/umap/locale/sr.js +2 -8
- umap/static/umap/locale/sr.json +2 -8
- umap/static/umap/locale/sv.js +2 -8
- umap/static/umap/locale/sv.json +2 -8
- umap/static/umap/locale/th_TH.js +2 -8
- umap/static/umap/locale/th_TH.json +2 -8
- umap/static/umap/locale/tr.js +2 -8
- umap/static/umap/locale/tr.json +2 -8
- umap/static/umap/locale/uk_UA.js +2 -8
- umap/static/umap/locale/uk_UA.json +2 -8
- umap/static/umap/locale/vi.js +2 -8
- umap/static/umap/locale/vi.json +2 -8
- umap/static/umap/locale/vi_VN.json +2 -8
- umap/static/umap/locale/zh.js +2 -8
- umap/static/umap/locale/zh.json +2 -8
- umap/static/umap/locale/zh_CN.json +2 -8
- umap/static/umap/locale/zh_TW.Big5.json +2 -8
- umap/static/umap/locale/zh_TW.js +96 -102
- umap/static/umap/locale/zh_TW.json +96 -102
- umap/static/umap/map.css +4 -4
- umap/static/umap/vars.css +0 -1
- umap/static/umap/vendors/editable/Leaflet.Editable.js +1937 -2079
- umap/static/umap/vendors/markercluster/MarkerCluster.Default.css +1 -1
- umap/templates/umap/content_footer.html +1 -1
- umap/templates/umap/map_list.html +1 -3
- umap/tests/integration/test_browser.py +0 -20
- umap/tests/integration/test_conditional_rules.py +17 -102
- umap/tests/integration/test_draw_polygon.py +0 -28
- umap/tests/integration/test_edit_datalayer.py +2 -2
- umap/tests/integration/test_import.py +0 -60
- umap/tests/integration/test_querystring.py +0 -7
- {umap_project-2.6.0.dist-info → umap_project-2.6.0b0.dist-info}/METADATA +10 -10
- {umap_project-2.6.0.dist-info → umap_project-2.6.0b0.dist-info}/RECORD +131 -131
- {umap_project-2.6.0.dist-info → umap_project-2.6.0b0.dist-info}/WHEEL +0 -0
- {umap_project-2.6.0.dist-info → umap_project-2.6.0b0.dist-info}/entry_points.txt +0 -0
- {umap_project-2.6.0.dist-info → umap_project-2.6.0b0.dist-info}/licenses/LICENSE +0 -0
umap/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "2.6.
|
|
1
|
+
VERSION = "2.6.0b0"
|
|
@@ -8,7 +8,7 @@ msgid ""
|
|
|
8
8
|
msgstr ""
|
|
9
9
|
"Project-Id-Version: PACKAGE VERSION\n"
|
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
|
11
|
-
"POT-Creation-Date: 2024-
|
|
11
|
+
"POT-Creation-Date: 2024-08-30 18:23+0000\n"
|
|
12
12
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
13
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
14
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
@@ -368,11 +368,11 @@ msgstr ""
|
|
|
368
368
|
msgid "You are logged in. Continuing..."
|
|
369
369
|
msgstr ""
|
|
370
370
|
|
|
371
|
-
#: templates/umap/map_list.html:
|
|
371
|
+
#: templates/umap/map_list.html:10 views.py:433
|
|
372
372
|
msgid "by"
|
|
373
373
|
msgstr ""
|
|
374
374
|
|
|
375
|
-
#: templates/umap/map_list.html:
|
|
375
|
+
#: templates/umap/map_list.html:18
|
|
376
376
|
msgid "More"
|
|
377
377
|
msgstr ""
|
|
378
378
|
|
|
Binary file
|
|
@@ -12,7 +12,7 @@ msgid ""
|
|
|
12
12
|
msgstr ""
|
|
13
13
|
"Project-Id-Version: uMap\n"
|
|
14
14
|
"Report-Msgid-Bugs-To: \n"
|
|
15
|
-
"POT-Creation-Date: 2024-
|
|
15
|
+
"POT-Creation-Date: 2024-08-30 18:23+0000\n"
|
|
16
16
|
"PO-Revision-Date: 2013-11-22 14:00+0000\n"
|
|
17
17
|
"Last-Translator: imni <iriman@chmail.ir>, 2024\n"
|
|
18
18
|
"Language-Team: Persian (Iran) (http://app.transifex.com/openstreetmap/umap/language/fa_IR/)\n"
|
|
@@ -326,19 +326,19 @@ msgstr "این یک نمونهٔ نمایشی است که برای آزمایش
|
|
|
326
326
|
|
|
327
327
|
#: templates/umap/content_footer.html:5
|
|
328
328
|
msgid "An OpenStreetMap project"
|
|
329
|
-
msgstr "
|
|
329
|
+
msgstr ""
|
|
330
330
|
|
|
331
331
|
#: templates/umap/content_footer.html:6
|
|
332
332
|
msgid "version"
|
|
333
|
-
msgstr "
|
|
333
|
+
msgstr ""
|
|
334
334
|
|
|
335
335
|
#: templates/umap/content_footer.html:7
|
|
336
336
|
msgid "Hosted by"
|
|
337
|
-
msgstr "
|
|
337
|
+
msgstr ""
|
|
338
338
|
|
|
339
339
|
#: templates/umap/content_footer.html:8
|
|
340
340
|
msgid "Contact"
|
|
341
|
-
msgstr "
|
|
341
|
+
msgstr ""
|
|
342
342
|
|
|
343
343
|
#: templates/umap/content_footer.html:9 templates/umap/navigation.html:25
|
|
344
344
|
msgid "Help"
|
|
@@ -373,11 +373,11 @@ msgstr "الهام بگیرید، نقشهها را مرور کنید"
|
|
|
373
373
|
msgid "You are logged in. Continuing..."
|
|
374
374
|
msgstr "شما وارد شدهاید. ادامه..."
|
|
375
375
|
|
|
376
|
-
#: templates/umap/map_list.html:
|
|
376
|
+
#: templates/umap/map_list.html:10 views.py:433
|
|
377
377
|
msgid "by"
|
|
378
378
|
msgstr "ساختهٔ"
|
|
379
379
|
|
|
380
|
-
#: templates/umap/map_list.html:
|
|
380
|
+
#: templates/umap/map_list.html:18
|
|
381
381
|
msgid "More"
|
|
382
382
|
msgstr "بیشتر"
|
|
383
383
|
|
|
@@ -553,12 +553,12 @@ msgstr "جستجو"
|
|
|
553
553
|
#: templates/umap/team_detail.html:10
|
|
554
554
|
#, python-format
|
|
555
555
|
msgid "Browse %(current_team)s's maps"
|
|
556
|
-
msgstr "
|
|
556
|
+
msgstr ""
|
|
557
557
|
|
|
558
558
|
#: templates/umap/team_detail.html:22
|
|
559
559
|
#, python-format
|
|
560
560
|
msgid "%(current_team)s has no public maps."
|
|
561
|
-
msgstr "
|
|
561
|
+
msgstr ""
|
|
562
562
|
|
|
563
563
|
#: templates/umap/team_form.html:24
|
|
564
564
|
msgid "Delete this team"
|
|
Binary file
|
|
@@ -9,7 +9,7 @@ msgid ""
|
|
|
9
9
|
msgstr ""
|
|
10
10
|
"Project-Id-Version: uMap\n"
|
|
11
11
|
"Report-Msgid-Bugs-To: \n"
|
|
12
|
-
"POT-Creation-Date: 2024-
|
|
12
|
+
"POT-Creation-Date: 2024-08-30 18:23+0000\n"
|
|
13
13
|
"PO-Revision-Date: 2013-11-22 14:00+0000\n"
|
|
14
14
|
"Last-Translator: Gábor Babos <gabor.babos@gmail.com>, 2017-2019,2023-2024\n"
|
|
15
15
|
"Language-Team: Hungarian (http://app.transifex.com/openstreetmap/umap/language/hu/)\n"
|
|
@@ -65,7 +65,7 @@ msgstr "Mindenki"
|
|
|
65
65
|
|
|
66
66
|
#: models.py:168 models.py:174 models.py:425
|
|
67
67
|
msgid "Editors and team only"
|
|
68
|
-
msgstr "
|
|
68
|
+
msgstr ""
|
|
69
69
|
|
|
70
70
|
#: models.py:169 models.py:426
|
|
71
71
|
msgid "Owner only"
|
|
@@ -117,7 +117,7 @@ msgstr "szerkesztők"
|
|
|
117
117
|
|
|
118
118
|
#: models.py:207
|
|
119
119
|
msgid "team"
|
|
120
|
-
msgstr "
|
|
120
|
+
msgstr ""
|
|
121
121
|
|
|
122
122
|
#: models.py:213 models.py:447
|
|
123
123
|
msgid "edit status"
|
|
@@ -323,19 +323,19 @@ msgstr "Ez egy demonstrációs változat, amelyet tesztelésre és még nem nyil
|
|
|
323
323
|
|
|
324
324
|
#: templates/umap/content_footer.html:5
|
|
325
325
|
msgid "An OpenStreetMap project"
|
|
326
|
-
msgstr "
|
|
326
|
+
msgstr ""
|
|
327
327
|
|
|
328
328
|
#: templates/umap/content_footer.html:6
|
|
329
329
|
msgid "version"
|
|
330
|
-
msgstr "
|
|
330
|
+
msgstr ""
|
|
331
331
|
|
|
332
332
|
#: templates/umap/content_footer.html:7
|
|
333
333
|
msgid "Hosted by"
|
|
334
|
-
msgstr "
|
|
334
|
+
msgstr ""
|
|
335
335
|
|
|
336
336
|
#: templates/umap/content_footer.html:8
|
|
337
337
|
msgid "Contact"
|
|
338
|
-
msgstr "
|
|
338
|
+
msgstr ""
|
|
339
339
|
|
|
340
340
|
#: templates/umap/content_footer.html:9 templates/umap/navigation.html:25
|
|
341
341
|
msgid "Help"
|
|
@@ -356,7 +356,7 @@ msgstr "Saját profil"
|
|
|
356
356
|
|
|
357
357
|
#: templates/umap/dashboard_menu.html:13
|
|
358
358
|
msgid "My teams"
|
|
359
|
-
msgstr "
|
|
359
|
+
msgstr ""
|
|
360
360
|
|
|
361
361
|
#: templates/umap/home.html:14
|
|
362
362
|
msgid "Map of the uMaps"
|
|
@@ -370,11 +370,11 @@ msgstr "Szerezzen ihletet, böngésszen a térképek között!"
|
|
|
370
370
|
msgid "You are logged in. Continuing..."
|
|
371
371
|
msgstr "Be van jelentkezve. Továbblépés…"
|
|
372
372
|
|
|
373
|
-
#: templates/umap/map_list.html:
|
|
373
|
+
#: templates/umap/map_list.html:10 views.py:433
|
|
374
374
|
msgid "by"
|
|
375
375
|
msgstr "– készítette:"
|
|
376
376
|
|
|
377
|
-
#: templates/umap/map_list.html:
|
|
377
|
+
#: templates/umap/map_list.html:18
|
|
378
378
|
msgid "More"
|
|
379
379
|
msgstr "Még több"
|
|
380
380
|
|
|
@@ -550,20 +550,20 @@ msgstr "Keresés"
|
|
|
550
550
|
#: templates/umap/team_detail.html:10
|
|
551
551
|
#, python-format
|
|
552
552
|
msgid "Browse %(current_team)s's maps"
|
|
553
|
-
msgstr "
|
|
553
|
+
msgstr ""
|
|
554
554
|
|
|
555
555
|
#: templates/umap/team_detail.html:22
|
|
556
556
|
#, python-format
|
|
557
557
|
msgid "%(current_team)s has no public maps."
|
|
558
|
-
msgstr "
|
|
558
|
+
msgstr ""
|
|
559
559
|
|
|
560
560
|
#: templates/umap/team_form.html:24
|
|
561
561
|
msgid "Delete this team"
|
|
562
|
-
msgstr "
|
|
562
|
+
msgstr ""
|
|
563
563
|
|
|
564
564
|
#: templates/umap/team_form.html:47
|
|
565
565
|
msgid "Add user"
|
|
566
|
-
msgstr "
|
|
566
|
+
msgstr ""
|
|
567
567
|
|
|
568
568
|
#: templates/umap/user_dashboard.html:9 templates/umap/user_dashboard.html:25
|
|
569
569
|
msgid "Search my maps"
|
|
@@ -584,20 +584,20 @@ msgstr "Önnek még nincs térképe."
|
|
|
584
584
|
|
|
585
585
|
#: templates/umap/user_teams.html:17
|
|
586
586
|
msgid "Users"
|
|
587
|
-
msgstr "
|
|
587
|
+
msgstr ""
|
|
588
588
|
|
|
589
589
|
#: templates/umap/user_teams.html:48
|
|
590
590
|
msgid "New team"
|
|
591
|
-
msgstr "
|
|
591
|
+
msgstr ""
|
|
592
592
|
|
|
593
593
|
#: views.py:235
|
|
594
594
|
msgid "Cannot delete a team with more than one member"
|
|
595
|
-
msgstr "
|
|
595
|
+
msgstr ""
|
|
596
596
|
|
|
597
597
|
#: views.py:239
|
|
598
598
|
#, python-format
|
|
599
599
|
msgid "Team “%(name)s” has been deleted"
|
|
600
|
-
msgstr "
|
|
600
|
+
msgstr ""
|
|
601
601
|
|
|
602
602
|
#: views.py:438
|
|
603
603
|
msgid "View the map"
|
umap/settings/base.py
CHANGED
|
@@ -51,12 +51,6 @@ LANG_INFO.update(
|
|
|
51
51
|
"name": "Malay",
|
|
52
52
|
"name_local": "Bahasa Melayu",
|
|
53
53
|
},
|
|
54
|
-
"fa-ir": {
|
|
55
|
-
"bidi": True,
|
|
56
|
-
"code": "fa-ir",
|
|
57
|
-
"name": "Persian (Iran)",
|
|
58
|
-
"name_local": "فارسی",
|
|
59
|
-
},
|
|
60
54
|
}
|
|
61
55
|
)
|
|
62
56
|
# Local time zone for this installation. Choices can be found here:
|
|
@@ -306,11 +306,15 @@ export const SingleMixin = (Base) =>
|
|
|
306
306
|
textContent: '×',
|
|
307
307
|
})
|
|
308
308
|
this.input.style.display = 'none'
|
|
309
|
-
DomEvent.on(
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
309
|
+
DomEvent.on(
|
|
310
|
+
close,
|
|
311
|
+
'click',
|
|
312
|
+
function () {
|
|
313
|
+
this.selectedContainer.innerHTML = ''
|
|
314
|
+
this.input.style.display = 'block'
|
|
315
|
+
},
|
|
316
|
+
this
|
|
317
|
+
)
|
|
314
318
|
this.hide()
|
|
315
319
|
}
|
|
316
320
|
}
|
|
@@ -98,10 +98,6 @@ class Feature {
|
|
|
98
98
|
this.pushGeometry()
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
isOnScreen(bounds) {
|
|
102
|
-
return this.ui?.isOnScreen(bounds)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
101
|
pushGeometry() {
|
|
106
102
|
this.ui.setLatLngs(this.toLatLngs())
|
|
107
103
|
}
|
|
@@ -261,7 +257,7 @@ class Feature {
|
|
|
261
257
|
builder.helpers['properties.name'].input.focus()
|
|
262
258
|
})
|
|
263
259
|
this.map.editedFeature = this
|
|
264
|
-
if (!this.
|
|
260
|
+
if (!this.isOnScreen()) this.zoomTo(event)
|
|
265
261
|
}
|
|
266
262
|
|
|
267
263
|
getAdvancedEditActions(container) {
|
|
@@ -508,12 +504,7 @@ class Feature {
|
|
|
508
504
|
|
|
509
505
|
matchFilter(filter, keys) {
|
|
510
506
|
filter = filter.toLowerCase()
|
|
511
|
-
|
|
512
|
-
// it will use the datalayer's name, so let's make the filtering
|
|
513
|
-
// consistent.
|
|
514
|
-
// Also, if the user has defined a labelKey with vars, let's
|
|
515
|
-
// compute before filtering
|
|
516
|
-
if (Utils.hasVar(keys) || keys === 'displayName') {
|
|
507
|
+
if (Utils.hasVar(keys)) {
|
|
517
508
|
return this.getDisplayName().toLowerCase().indexOf(filter) !== -1
|
|
518
509
|
}
|
|
519
510
|
keys = keys.split(',')
|
|
@@ -670,6 +661,11 @@ export class Point extends Feature {
|
|
|
670
661
|
super.zoomTo(event)
|
|
671
662
|
}
|
|
672
663
|
}
|
|
664
|
+
|
|
665
|
+
isOnScreen(bounds) {
|
|
666
|
+
bounds = bounds || this.map.getBounds()
|
|
667
|
+
return bounds.contains(this.toLatLngs())
|
|
668
|
+
}
|
|
673
669
|
}
|
|
674
670
|
|
|
675
671
|
class Path extends Feature {
|
|
@@ -685,8 +681,8 @@ class Path extends Feature {
|
|
|
685
681
|
|
|
686
682
|
edit(event) {
|
|
687
683
|
if (this.map.editEnabled) {
|
|
684
|
+
if (!this.ui.editEnabled()) this.ui.enableEdit()
|
|
688
685
|
super.edit(event)
|
|
689
|
-
if (!this.ui.editEnabled()) this.ui.makeGeometryEditable()
|
|
690
686
|
}
|
|
691
687
|
}
|
|
692
688
|
|
|
@@ -757,6 +753,11 @@ class Path extends Feature {
|
|
|
757
753
|
return items
|
|
758
754
|
}
|
|
759
755
|
|
|
756
|
+
isOnScreen(bounds) {
|
|
757
|
+
bounds = bounds || this.map.getBounds()
|
|
758
|
+
return bounds.overlaps(this.bounds)
|
|
759
|
+
}
|
|
760
|
+
|
|
760
761
|
zoomTo({ easing, callback }) {
|
|
761
762
|
// Use bounds instead of centroid for paths.
|
|
762
763
|
easing = easing || this.map.getOption('easing')
|
|
@@ -1115,7 +1115,7 @@ export class DataLayer {
|
|
|
1115
1115
|
if (this.map.options.filterKey) return this.map.options.filterKey
|
|
1116
1116
|
if (this.getOption('labelKey')) return this.getOption('labelKey')
|
|
1117
1117
|
if (this.map.options.sortKey) return this.map.options.sortKey
|
|
1118
|
-
return '
|
|
1118
|
+
return 'name'
|
|
1119
1119
|
}
|
|
1120
1120
|
|
|
1121
1121
|
renderLegend(container) {
|
|
@@ -25,20 +25,10 @@ class Autocomplete extends SingleMixin(BaseAjax) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
createResult(item) {
|
|
28
|
-
const labels = [item.properties.name]
|
|
29
|
-
if (item.properties.county) {
|
|
30
|
-
labels.push(item.properties.county)
|
|
31
|
-
}
|
|
32
|
-
if (item.properties.state) {
|
|
33
|
-
labels.push(item.properties.state)
|
|
34
|
-
}
|
|
35
|
-
if (item.properties.country) {
|
|
36
|
-
labels.push(item.properties.country)
|
|
37
|
-
}
|
|
38
28
|
return super.createResult({
|
|
39
29
|
// Overpass convention to get their id from an osm one.
|
|
40
30
|
value: item.properties.osm_id + 3600000000,
|
|
41
|
-
label:
|
|
31
|
+
label: `${item.properties.name}`,
|
|
42
32
|
})
|
|
43
33
|
}
|
|
44
34
|
}
|
|
@@ -52,10 +42,11 @@ export class Importer {
|
|
|
52
42
|
options?.searchUrl ||
|
|
53
43
|
'https://photon.komoot.io/api?q={q}&layer=county&layer=city&layer=state'
|
|
54
44
|
this.id = 'overpass'
|
|
55
|
-
this.boundaryChoice = null
|
|
56
45
|
}
|
|
57
46
|
|
|
58
47
|
async open(importer) {
|
|
48
|
+
let boundary = null
|
|
49
|
+
let boundaryName = null
|
|
59
50
|
const container = DomUtil.create('div')
|
|
60
51
|
container.innerHTML = TEMPLATE
|
|
61
52
|
this.autocomplete = new Autocomplete(container.querySelector('#area'), {
|
|
@@ -64,15 +55,10 @@ export class Importer {
|
|
|
64
55
|
'Type area name, or let empty to load data in current map view'
|
|
65
56
|
),
|
|
66
57
|
on_select: (choice) => {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
on_unselect: (choice) => {
|
|
70
|
-
this.boundaryChoice = null
|
|
58
|
+
boundary = choice.item.value
|
|
59
|
+
boundaryName = choice.item.label
|
|
71
60
|
},
|
|
72
61
|
})
|
|
73
|
-
if (this.boundaryChoice) {
|
|
74
|
-
this.autocomplete.displaySelected(this.boundaryChoice)
|
|
75
|
-
}
|
|
76
62
|
this.map.help.parse(container)
|
|
77
63
|
|
|
78
64
|
const confirm = (form) => {
|
|
@@ -83,10 +69,10 @@ export class Importer {
|
|
|
83
69
|
let tags = form.tags
|
|
84
70
|
if (!tags.startsWith('[')) tags = `[${tags}]`
|
|
85
71
|
let area = '{south},{west},{north},{east}'
|
|
86
|
-
if (
|
|
72
|
+
if (boundary) area = `area:${boundary}`
|
|
87
73
|
const query = `[out:json];nwr${tags}(${area});out ${form.out};`
|
|
88
74
|
importer.url = `${this.baseUrl}?data=${query}`
|
|
89
|
-
if (
|
|
75
|
+
if (boundary) importer.layerName = boundaryName
|
|
90
76
|
importer.format = 'osm'
|
|
91
77
|
}
|
|
92
78
|
|
|
@@ -95,7 +81,7 @@ export class Importer {
|
|
|
95
81
|
template: container,
|
|
96
82
|
className: `${this.id} importer dark`,
|
|
97
83
|
accept: translate('Choose this data'),
|
|
98
|
-
cancel: false
|
|
84
|
+
cancel: false
|
|
99
85
|
})
|
|
100
86
|
.then(confirm)
|
|
101
87
|
}
|
|
@@ -93,21 +93,13 @@ const FeatureMixin = {
|
|
|
93
93
|
getContextMenuItems: function (event) {
|
|
94
94
|
const permalink = this.feature.getPermalink()
|
|
95
95
|
let items = []
|
|
96
|
-
if (permalink)
|
|
96
|
+
if (permalink)
|
|
97
97
|
items.push({
|
|
98
98
|
text: translate('Permalink'),
|
|
99
99
|
callback: () => {
|
|
100
100
|
window.open(permalink)
|
|
101
101
|
},
|
|
102
102
|
})
|
|
103
|
-
}
|
|
104
|
-
items.push({
|
|
105
|
-
text: translate('Copy as GeoJSON'),
|
|
106
|
-
callback: () => {
|
|
107
|
-
L.Util.copyToClipboard(JSON.stringify(this.feature.toGeoJSON()))
|
|
108
|
-
this._map.tooltip.open({ content: L._('✅ Copied!') })
|
|
109
|
-
},
|
|
110
|
-
})
|
|
111
103
|
if (this._map.editEnabled && !this.feature.isReadOnly()) {
|
|
112
104
|
items = items.concat(this.getContextMenuEditItems(event))
|
|
113
105
|
}
|
|
@@ -154,15 +146,9 @@ const FeatureMixin = {
|
|
|
154
146
|
getPopupToolbarAnchor: () => [0, 0],
|
|
155
147
|
}
|
|
156
148
|
|
|
157
|
-
const PointMixin = {
|
|
158
|
-
isOnScreen: function (bounds) {
|
|
159
|
-
return bounds.contains(this.getCenter())
|
|
160
|
-
},
|
|
161
|
-
}
|
|
162
|
-
|
|
163
149
|
export const LeafletMarker = Marker.extend({
|
|
164
150
|
parentClass: Marker,
|
|
165
|
-
includes: [FeatureMixin
|
|
151
|
+
includes: [FeatureMixin],
|
|
166
152
|
|
|
167
153
|
initialize: function (feature, latlng) {
|
|
168
154
|
FeatureMixin.initialize.call(this, feature, latlng)
|
|
@@ -288,21 +274,6 @@ const PathMixin = {
|
|
|
288
274
|
}
|
|
289
275
|
},
|
|
290
276
|
|
|
291
|
-
makeGeometryEditable: function () {
|
|
292
|
-
if (this._map.editedFeature !== this.feature) {
|
|
293
|
-
this.disableEdit()
|
|
294
|
-
return
|
|
295
|
-
}
|
|
296
|
-
this._map.once('moveend', this.makeGeometryEditable, this)
|
|
297
|
-
const pointsCount = this._parts.reduce((acc, part) => acc + part.length, 0)
|
|
298
|
-
if (pointsCount > 100 && this._map.getZoom() < this._map.getMaxZoom()) {
|
|
299
|
-
this._map.tooltip.open({ content: L._('Please zoom in to edit the geometry') })
|
|
300
|
-
this.disableEdit()
|
|
301
|
-
} else {
|
|
302
|
-
this.enableEdit()
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
|
|
306
277
|
addInteractions: function () {
|
|
307
278
|
FeatureMixin.addInteractions.call(this)
|
|
308
279
|
this.on('editable:disable', this.onCommit)
|
|
@@ -398,7 +369,7 @@ const PathMixin = {
|
|
|
398
369
|
getContextMenuEditItems: function (event) {
|
|
399
370
|
const items = FeatureMixin.getContextMenuEditItems.call(this, event)
|
|
400
371
|
if (
|
|
401
|
-
this._map?.editedFeature !== this
|
|
372
|
+
this._map?.editedFeature !== this &&
|
|
402
373
|
this.feature.isSameClass(this._map.editedFeature)
|
|
403
374
|
) {
|
|
404
375
|
items.push({
|
|
@@ -440,10 +411,6 @@ const PathMixin = {
|
|
|
440
411
|
'dashArray',
|
|
441
412
|
'interactive',
|
|
442
413
|
],
|
|
443
|
-
|
|
444
|
-
isOnScreen: function (bounds) {
|
|
445
|
-
return bounds.overlaps(this.getBounds())
|
|
446
|
-
},
|
|
447
414
|
}
|
|
448
415
|
|
|
449
416
|
export const LeafletPolyline = Polyline.extend({
|
|
@@ -585,7 +552,7 @@ export const MaskPolygon = LeafletPolygon.extend({
|
|
|
585
552
|
|
|
586
553
|
export const CircleMarker = BaseCircleMarker.extend({
|
|
587
554
|
parentClass: BaseCircleMarker,
|
|
588
|
-
includes: [FeatureMixin, PathMixin
|
|
555
|
+
includes: [FeatureMixin, PathMixin],
|
|
589
556
|
initialize: function (feature, latlng) {
|
|
590
557
|
if (Array.isArray(latlng) && !(latlng[0] instanceof Number)) {
|
|
591
558
|
// Must be a line or polygon
|
|
@@ -603,8 +570,4 @@ export const CircleMarker = BaseCircleMarker.extend({
|
|
|
603
570
|
getCenter: function () {
|
|
604
571
|
return this._latlng
|
|
605
572
|
},
|
|
606
|
-
// FIXME when Leaflet.Editable knows about CircleMarker
|
|
607
|
-
editEnabled: () => false,
|
|
608
|
-
enableEdit: () => {}, // No-op
|
|
609
|
-
disableEdit: () => {}, // No-op
|
|
610
573
|
})
|
|
@@ -3,8 +3,6 @@ import { translate } from './i18n.js'
|
|
|
3
3
|
import * as Utils from './utils.js'
|
|
4
4
|
import { AutocompleteDatalist } from './autocomplete.js'
|
|
5
5
|
|
|
6
|
-
const EMPTY_VALUES = ['', undefined, null]
|
|
7
|
-
|
|
8
6
|
class Rule {
|
|
9
7
|
get condition() {
|
|
10
8
|
return this._condition
|
|
@@ -77,22 +75,13 @@ class Rule {
|
|
|
77
75
|
if (vars.length !== 2) return
|
|
78
76
|
this.key = vars[0]
|
|
79
77
|
this.expected = vars[1]
|
|
80
|
-
if (EMPTY_VALUES.includes(this.expected)) {
|
|
81
|
-
this.cast = (v) => EMPTY_VALUES.includes(v)
|
|
82
|
-
}
|
|
83
78
|
// Special cases where we want to be lousy when checking isNaN without
|
|
84
79
|
// coercing to a Number first because we handle multiple types.
|
|
85
80
|
// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/
|
|
86
81
|
// Reference/Global_Objects/Number/isNaN
|
|
87
82
|
// biome-ignore lint/suspicious/noGlobalIsNan: expected might not be a number.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
} else if (['true', 'false'].includes(this.expected)) {
|
|
91
|
-
this.cast = (v) => {
|
|
92
|
-
if (`${v}`.toLowerCase() === 'true') return true
|
|
93
|
-
if (`${v}`.toLowerCase() === 'false') return false
|
|
94
|
-
}
|
|
95
|
-
}
|
|
83
|
+
if (!isNaN(this.expected)) this.cast = Number.parseFloat
|
|
84
|
+
else if (['true', 'false'].includes(this.expected)) this.cast = (v) => !!v
|
|
96
85
|
this.expected = this.cast(this.expected)
|
|
97
86
|
}
|
|
98
87
|
|
|
@@ -144,9 +133,7 @@ class Rule {
|
|
|
144
133
|
autocomplete.suggestions = [`${value}=`, `${value}!=`, `${value}>`, `${value}<`]
|
|
145
134
|
} else if (value.endsWith('=')) {
|
|
146
135
|
const key = value.split('!')[0].split('=')[0]
|
|
147
|
-
autocomplete.suggestions = this.map
|
|
148
|
-
.sortedValues(key)
|
|
149
|
-
.map((str) => `${value}${str || ''}`)
|
|
136
|
+
autocomplete.suggestions = this.map.sortedValues(key).map((str) => `${value}${str || ''}`)
|
|
150
137
|
}
|
|
151
138
|
})
|
|
152
139
|
this.map.editPanel.open({ content: container })
|
|
@@ -795,14 +795,13 @@ U.TileLayerControl = L.Control.IconLayers.extend({
|
|
|
795
795
|
}
|
|
796
796
|
})
|
|
797
797
|
}
|
|
798
|
-
this._allLayers = layers
|
|
799
798
|
L.Control.IconLayers.prototype.setLayers.call(this, layers.slice(0, this.maxShown))
|
|
800
799
|
if (this.map.selected_tilelayer) this.setActiveLayer(this.map.selected_tilelayer)
|
|
801
800
|
},
|
|
802
801
|
|
|
803
802
|
_createLayerElements: function () {
|
|
804
803
|
L.Control.IconLayers.prototype._createLayerElements.call(this)
|
|
805
|
-
if (Object.keys(this.
|
|
804
|
+
if (Object.keys(this._layers) <= this.maxShown) return
|
|
806
805
|
const lastRow = this._container.querySelector(
|
|
807
806
|
'.leaflet-iconLayers-layersRow:last-child'
|
|
808
807
|
)
|
|
@@ -902,8 +902,8 @@ L.FormBuilder.MultiChoice = L.FormBuilder.Element.extend({
|
|
|
902
902
|
if (!this.container.querySelector(`input[type="radio"][value="${value}"]`)) {
|
|
903
903
|
value = this.options.default !== undefined ? this.options.default : this.default
|
|
904
904
|
}
|
|
905
|
-
const choices = this.getChoices().map(([value, label]) =>
|
|
906
|
-
if (choices.includes(
|
|
905
|
+
const choices = this.getChoices().map(([value, label]) => value)
|
|
906
|
+
if (choices.includes(value)) {
|
|
907
907
|
this.container.querySelector(`input[type="radio"][value="${value}"]`).checked =
|
|
908
908
|
true
|
|
909
909
|
}
|
|
@@ -925,8 +925,8 @@ L.FormBuilder.MultiChoice = L.FormBuilder.Element.extend({
|
|
|
925
925
|
`${this.className} by${choices.length}`,
|
|
926
926
|
this.parentNode
|
|
927
927
|
)
|
|
928
|
-
for (
|
|
929
|
-
this.addChoice(
|
|
928
|
+
for (let i = 0; i < choices.length; i++) {
|
|
929
|
+
this.addChoice(choices[i][0], choices[i][1], i)
|
|
930
930
|
}
|
|
931
931
|
this.fetch()
|
|
932
932
|
},
|
|
@@ -958,12 +958,8 @@ L.FormBuilder.TernaryChoices = L.FormBuilder.MultiChoice.extend({
|
|
|
958
958
|
case false:
|
|
959
959
|
value = false
|
|
960
960
|
break
|
|
961
|
-
case 'null':
|
|
962
|
-
case null:
|
|
963
|
-
value = null
|
|
964
|
-
break
|
|
965
961
|
default:
|
|
966
|
-
value =
|
|
962
|
+
value = null
|
|
967
963
|
}
|
|
968
964
|
return value
|
|
969
965
|
},
|
umap/static/umap/js/umap.js
CHANGED
|
@@ -144,10 +144,7 @@ U.Map = L.Map.extend({
|
|
|
144
144
|
delete this.options.displayDataBrowserOnLoad
|
|
145
145
|
}
|
|
146
146
|
if (this.options.datalayersControl === 'expanded') {
|
|
147
|
-
|
|
148
|
-
this.options.onLoadPanel = 'datalayers'
|
|
149
|
-
}
|
|
150
|
-
delete this.options.datalayersControl
|
|
147
|
+
this.options.onLoadPanel = 'datalayers'
|
|
151
148
|
}
|
|
152
149
|
if (this.options.onLoadPanel === 'facet') {
|
|
153
150
|
this.options.onLoadPanel = 'datafilters'
|
|
@@ -283,9 +280,7 @@ U.Map = L.Map.extend({
|
|
|
283
280
|
// Specific case for datalayersControl
|
|
284
281
|
// which accepts "expanded" value, on top of true/false/null
|
|
285
282
|
if (L.Util.queryString('datalayersControl') === 'expanded') {
|
|
286
|
-
|
|
287
|
-
options.onLoadPanel = 'datalayers'
|
|
288
|
-
}
|
|
283
|
+
options.onLoadPanel = 'datalayers'
|
|
289
284
|
}
|
|
290
285
|
},
|
|
291
286
|
|
umap/static/umap/locale/am_ET.js
CHANGED
|
@@ -115,6 +115,7 @@ const locale = {
|
|
|
115
115
|
"display name": "ስሙን አሳይ",
|
|
116
116
|
"Display on load": "በመጫን ላይ እያለ አሳይ",
|
|
117
117
|
"Display the control to open OpenStreetMap editor": "Display the control to open OpenStreetMap editor",
|
|
118
|
+
"Display the data layers control": "Display the data layers control",
|
|
118
119
|
"Display the embed control": "Display the embed control",
|
|
119
120
|
"Display the fullscreen control": "Display the fullscreen control",
|
|
120
121
|
"Display the locate control": "Display the locate control",
|
|
@@ -497,14 +498,7 @@ const locale = {
|
|
|
497
498
|
"Found {count} rows. Are you sure you want to delete all?": "Found {count} rows. Are you sure you want to delete all?",
|
|
498
499
|
"Expression is empty": "Expression is empty",
|
|
499
500
|
"OK": "OK",
|
|
500
|
-
"Cancel": "Cancel"
|
|
501
|
-
"Attach map to a team": "Attach map to a team",
|
|
502
|
-
"Display the polygon inverted": "Display the polygon inverted",
|
|
503
|
-
"Proportional circles": "Proportional circles",
|
|
504
|
-
"Property name to compute circles": "Property name to compute circles",
|
|
505
|
-
"Min circle radius": "Min circle radius",
|
|
506
|
-
"Max circle radius": "Max circle radius",
|
|
507
|
-
"Display the open browser control": "Display the open browser control"
|
|
501
|
+
"Cancel": "Cancel"
|
|
508
502
|
}
|
|
509
503
|
L.registerLocale("am_ET", locale)
|
|
510
504
|
L.setLocale("am_ET")
|