umap-project 3.1.2__py3-none-any.whl → 3.3.0__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.

Files changed (199) hide show
  1. umap/__init__.py +1 -1
  2. umap/locale/en/LC_MESSAGES/django.mo +0 -0
  3. umap/locale/en/LC_MESSAGES/django.po +22 -18
  4. umap/locale/fr/LC_MESSAGES/django.mo +0 -0
  5. umap/locale/fr/LC_MESSAGES/django.po +21 -17
  6. umap/management/commands/export_pictogram.py +29 -0
  7. umap/management/commands/migrate_to_S3.py +5 -1
  8. umap/management/commands/purge_old_versions.py +8 -6
  9. umap/settings/__init__.py +21 -0
  10. umap/settings/base.py +3 -0
  11. umap/static/umap/content.css +7 -2
  12. umap/static/umap/css/contextmenu.css +58 -2
  13. umap/static/umap/css/form.css +175 -45
  14. umap/static/umap/css/icon.css +97 -3
  15. umap/static/umap/css/panel.css +31 -1
  16. umap/static/umap/img/16-white.svg +21 -40
  17. umap/static/umap/img/16.svg +1 -1
  18. umap/static/umap/img/24-white.svg +9 -9
  19. umap/static/umap/img/24.svg +23 -10
  20. umap/static/umap/img/source/16-white.svg +23 -41
  21. umap/static/umap/img/source/16.svg +1 -1
  22. umap/static/umap/img/source/24-white.svg +11 -11
  23. umap/static/umap/img/source/24.svg +25 -12
  24. umap/static/umap/js/modules/browser.js +1 -1
  25. umap/static/umap/js/modules/caption.js +8 -0
  26. umap/static/umap/js/modules/data/features.js +331 -202
  27. umap/static/umap/js/modules/data/layer.js +263 -152
  28. umap/static/umap/js/modules/facets.js +2 -2
  29. umap/static/umap/js/modules/form/builder.js +11 -7
  30. umap/static/umap/js/modules/form/fields.js +66 -26
  31. umap/static/umap/js/modules/formatter.js +78 -28
  32. umap/static/umap/js/modules/importer.js +6 -1
  33. umap/static/umap/js/modules/importers/opendata.js +138 -33
  34. umap/static/umap/js/modules/importers/openrouteservice.js +140 -0
  35. umap/static/umap/js/modules/managers.js +67 -0
  36. umap/static/umap/js/modules/printer.js +107 -0
  37. umap/static/umap/js/modules/rendering/controls.js +78 -2
  38. umap/static/umap/js/modules/rendering/icon.js +116 -87
  39. umap/static/umap/js/modules/rendering/layers/classified.js +8 -7
  40. umap/static/umap/js/modules/rendering/layers/cluster.js +199 -63
  41. umap/static/umap/js/modules/rendering/map.js +6 -2
  42. umap/static/umap/js/modules/rendering/template.js +71 -1
  43. umap/static/umap/js/modules/rendering/ui.js +111 -34
  44. umap/static/umap/js/modules/rules.js +76 -23
  45. umap/static/umap/js/modules/schema.js +27 -0
  46. umap/static/umap/js/modules/share.js +19 -12
  47. umap/static/umap/js/modules/slideshow.js +1 -1
  48. umap/static/umap/js/modules/sync/updaters.js +1 -6
  49. umap/static/umap/js/modules/tableeditor.js +13 -37
  50. umap/static/umap/js/modules/templates.js +7 -6
  51. umap/static/umap/js/modules/ui/bar.js +6 -1
  52. umap/static/umap/js/modules/ui/base.js +24 -9
  53. umap/static/umap/js/modules/ui/contextmenu.js +17 -7
  54. umap/static/umap/js/modules/ui/dialog.js +7 -4
  55. umap/static/umap/js/modules/ui/panel.js +7 -0
  56. umap/static/umap/js/modules/umap.js +84 -67
  57. umap/static/umap/js/modules/utils.js +8 -7
  58. umap/static/umap/js/umap.controls.js +22 -57
  59. umap/static/umap/locale/am_ET.js +81 -9
  60. umap/static/umap/locale/am_ET.json +81 -9
  61. umap/static/umap/locale/ar.js +81 -9
  62. umap/static/umap/locale/ar.json +81 -9
  63. umap/static/umap/locale/ast.js +81 -9
  64. umap/static/umap/locale/ast.json +81 -9
  65. umap/static/umap/locale/bg.js +81 -9
  66. umap/static/umap/locale/bg.json +81 -9
  67. umap/static/umap/locale/br.js +68 -29
  68. umap/static/umap/locale/br.json +68 -29
  69. umap/static/umap/locale/ca.js +88 -16
  70. umap/static/umap/locale/ca.json +88 -16
  71. umap/static/umap/locale/cs_CZ.js +81 -9
  72. umap/static/umap/locale/cs_CZ.json +81 -9
  73. umap/static/umap/locale/da.js +48 -9
  74. umap/static/umap/locale/da.json +48 -9
  75. umap/static/umap/locale/de.js +48 -9
  76. umap/static/umap/locale/de.json +48 -9
  77. umap/static/umap/locale/el.js +58 -13
  78. umap/static/umap/locale/el.json +58 -13
  79. umap/static/umap/locale/en.js +48 -9
  80. umap/static/umap/locale/en.json +48 -9
  81. umap/static/umap/locale/en_US.json +81 -9
  82. umap/static/umap/locale/es.js +48 -9
  83. umap/static/umap/locale/es.json +48 -9
  84. umap/static/umap/locale/et.js +81 -9
  85. umap/static/umap/locale/et.json +81 -9
  86. umap/static/umap/locale/eu.js +97 -25
  87. umap/static/umap/locale/eu.json +97 -25
  88. umap/static/umap/locale/fa_IR.js +81 -9
  89. umap/static/umap/locale/fa_IR.json +81 -9
  90. umap/static/umap/locale/fi.js +81 -9
  91. umap/static/umap/locale/fi.json +81 -9
  92. umap/static/umap/locale/fr.js +48 -9
  93. umap/static/umap/locale/fr.json +48 -9
  94. umap/static/umap/locale/gl.js +81 -9
  95. umap/static/umap/locale/gl.json +81 -9
  96. umap/static/umap/locale/he.js +81 -9
  97. umap/static/umap/locale/he.json +81 -9
  98. umap/static/umap/locale/hr.js +81 -9
  99. umap/static/umap/locale/hr.json +81 -9
  100. umap/static/umap/locale/hu.js +72 -27
  101. umap/static/umap/locale/hu.json +72 -27
  102. umap/static/umap/locale/id.js +81 -9
  103. umap/static/umap/locale/id.json +81 -9
  104. umap/static/umap/locale/is.js +81 -9
  105. umap/static/umap/locale/is.json +81 -9
  106. umap/static/umap/locale/it.js +48 -9
  107. umap/static/umap/locale/it.json +48 -9
  108. umap/static/umap/locale/ja.js +81 -9
  109. umap/static/umap/locale/ja.json +81 -9
  110. umap/static/umap/locale/ko.js +81 -9
  111. umap/static/umap/locale/ko.json +81 -9
  112. umap/static/umap/locale/lt.js +81 -9
  113. umap/static/umap/locale/lt.json +81 -9
  114. umap/static/umap/locale/ms.js +81 -9
  115. umap/static/umap/locale/ms.json +81 -9
  116. umap/static/umap/locale/nl.js +48 -9
  117. umap/static/umap/locale/nl.json +48 -9
  118. umap/static/umap/locale/no.js +81 -9
  119. umap/static/umap/locale/no.json +81 -9
  120. umap/static/umap/locale/pl.js +81 -9
  121. umap/static/umap/locale/pl.json +81 -9
  122. umap/static/umap/locale/pl_PL.json +81 -9
  123. umap/static/umap/locale/pt.js +81 -9
  124. umap/static/umap/locale/pt.json +81 -9
  125. umap/static/umap/locale/pt_BR.js +91 -19
  126. umap/static/umap/locale/pt_BR.json +91 -19
  127. umap/static/umap/locale/pt_PT.js +81 -9
  128. umap/static/umap/locale/pt_PT.json +81 -9
  129. umap/static/umap/locale/ro.js +81 -9
  130. umap/static/umap/locale/ro.json +81 -9
  131. umap/static/umap/locale/ru.js +81 -9
  132. umap/static/umap/locale/ru.json +81 -9
  133. umap/static/umap/locale/sk_SK.js +81 -9
  134. umap/static/umap/locale/sk_SK.json +81 -9
  135. umap/static/umap/locale/sl.js +81 -9
  136. umap/static/umap/locale/sl.json +81 -9
  137. umap/static/umap/locale/sr.js +81 -9
  138. umap/static/umap/locale/sr.json +81 -9
  139. umap/static/umap/locale/sv.js +81 -9
  140. umap/static/umap/locale/sv.json +81 -9
  141. umap/static/umap/locale/th_TH.js +81 -9
  142. umap/static/umap/locale/th_TH.json +81 -9
  143. umap/static/umap/locale/tr.js +81 -9
  144. umap/static/umap/locale/tr.json +81 -9
  145. umap/static/umap/locale/uk_UA.js +81 -9
  146. umap/static/umap/locale/uk_UA.json +81 -9
  147. umap/static/umap/locale/vi.js +81 -9
  148. umap/static/umap/locale/vi.json +81 -9
  149. umap/static/umap/locale/vi_VN.json +81 -9
  150. umap/static/umap/locale/zh.js +81 -9
  151. umap/static/umap/locale/zh.json +81 -9
  152. umap/static/umap/locale/zh_CN.json +81 -9
  153. umap/static/umap/locale/zh_TW.Big5.json +81 -9
  154. umap/static/umap/locale/zh_TW.js +98 -26
  155. umap/static/umap/locale/zh_TW.json +98 -26
  156. umap/static/umap/map.css +325 -102
  157. umap/static/umap/vars.css +1 -0
  158. umap/static/umap/vendors/betterknown/betterknown.mjs +287 -0
  159. umap/static/umap/vendors/editable/Leaflet.Editable.js +3 -1
  160. umap/static/umap/vendors/openrouteservice/ors-js-client.js +521 -0
  161. umap/static/umap/vendors/openrouteservice/ors-js-client.js.map +1 -0
  162. umap/static/umap/vendors/simple-elevation-chart/elevation.js +63 -0
  163. umap/static/umap/vendors/simple-elevation-chart/elevation.svg +8 -0
  164. umap/static/umap/vendors/snapdom/snapdom.min.mjs +3 -0
  165. umap/storage/fs.py +3 -2
  166. umap/storage/staticfiles.py +12 -0
  167. umap/templates/base.html +4 -1
  168. umap/templates/umap/css.html +0 -4
  169. umap/templates/umap/js.html +1 -3
  170. umap/tests/base.py +9 -1
  171. umap/tests/integration/test_basics.py +3 -1
  172. umap/tests/integration/test_conditional_rules.py +79 -37
  173. umap/tests/integration/test_datalayer.py +1 -1
  174. umap/tests/integration/test_draw_polygon.py +3 -5
  175. umap/tests/integration/test_draw_polyline.py +4 -6
  176. umap/tests/integration/test_draw_route.py +178 -0
  177. umap/tests/integration/test_edit_datalayer.py +1 -1
  178. umap/tests/integration/test_edit_map.py +1 -1
  179. umap/tests/integration/test_edit_marker.py +8 -8
  180. umap/tests/integration/test_edit_polygon.py +2 -2
  181. umap/tests/integration/test_export_map.py +84 -10
  182. umap/tests/integration/test_import.py +140 -0
  183. umap/tests/integration/test_map_preview.py +1 -1
  184. umap/tests/integration/test_optimistic_merge.py +72 -12
  185. umap/tests/integration/test_share.py +1 -1
  186. umap/tests/integration/test_tableeditor.py +10 -7
  187. umap/tests/integration/test_websocket_sync.py +4 -4
  188. umap/utils.py +37 -0
  189. umap/views.py +18 -2
  190. umap_project-3.3.0.dist-info/METADATA +76 -0
  191. {umap_project-3.1.2.dist-info → umap_project-3.3.0.dist-info}/RECORD +194 -188
  192. umap/static/umap/vendors/markercluster/MarkerCluster.Default.css +0 -60
  193. umap/static/umap/vendors/markercluster/MarkerCluster.css +0 -14
  194. umap/static/umap/vendors/markercluster/leaflet.markercluster.js +0 -2
  195. umap/static/umap/vendors/markercluster/leaflet.markercluster.js.map +0 -1
  196. umap_project-3.1.2.dist-info/METADATA +0 -68
  197. {umap_project-3.1.2.dist-info → umap_project-3.3.0.dist-info}/WHEEL +0 -0
  198. {umap_project-3.1.2.dist-info → umap_project-3.3.0.dist-info}/entry_points.txt +0 -0
  199. {umap_project-3.1.2.dist-info → umap_project-3.3.0.dist-info}/licenses/LICENSE +0 -0
umap/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION = "3.1.2"
1
+ VERSION = "3.3.0"
Binary file
@@ -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: 2025-06-10 09:19+0000\n"
11
+ "POT-Creation-Date: 2025-08-14 15:22+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"
@@ -324,7 +324,7 @@ msgstr ""
324
324
  msgid "%(current_user)s has no starred maps yet."
325
325
  msgstr ""
326
326
 
327
- #: templates/base.html:13
327
+ #: templates/base.html:16
328
328
  msgid ""
329
329
  "uMap lets you create maps with OpenStreetMap layers in a minute and embed "
330
330
  "them in your site."
@@ -530,7 +530,7 @@ msgstr ""
530
530
  msgid "template"
531
531
  msgstr ""
532
532
 
533
- #: templates/umap/map_list.html:18 views.py:458
533
+ #: templates/umap/map_list.html:18 views.py:459
534
534
  msgid "by"
535
535
  msgstr ""
536
536
 
@@ -809,70 +809,74 @@ msgstr ""
809
809
  msgid "No template found."
810
810
  msgstr ""
811
811
 
812
- #: views.py:233
812
+ #: views.py:235
813
813
  msgid "Cannot delete a team with more than one member"
814
814
  msgstr ""
815
815
 
816
- #: views.py:237
816
+ #: views.py:239
817
817
  #, python-format
818
818
  msgid "Team “%(name)s” has been deleted"
819
819
  msgstr ""
820
820
 
821
- #: views.py:463
821
+ #: views.py:464
822
822
  msgid "View the map"
823
823
  msgstr ""
824
824
 
825
- #: views.py:864
825
+ #: views.py:867
826
826
  msgid "See full screen"
827
827
  msgstr ""
828
828
 
829
- #: views.py:1007
829
+ #: views.py:1010
830
830
  msgid "Map editors updated with success!"
831
831
  msgstr ""
832
832
 
833
- #: views.py:1043
833
+ #: views.py:1046
834
834
  #, python-format
835
835
  msgid "The uMap edit link for your map: %(map_name)s"
836
836
  msgstr ""
837
837
 
838
- #: views.py:1046
838
+ #: views.py:1049
839
839
  #, python-format
840
840
  msgid "Here is your secret edit link: %(link)s"
841
841
  msgstr ""
842
842
 
843
- #: views.py:1053
843
+ #: views.py:1056
844
844
  #, python-format
845
845
  msgid "Can't send email to %(email)s"
846
846
  msgstr ""
847
847
 
848
- #: views.py:1056
848
+ #: views.py:1059
849
849
  #, python-format
850
850
  msgid "Email sent to %(email)s"
851
851
  msgstr ""
852
852
 
853
- #: views.py:1067
853
+ #: views.py:1070
854
854
  msgid "Only its owner can delete the map."
855
855
  msgstr ""
856
856
 
857
- #: views.py:1073
857
+ #: views.py:1076
858
858
  msgid "Map successfully deleted."
859
859
  msgstr ""
860
860
 
861
- #: views.py:1099
861
+ #: views.py:1102
862
862
  #, python-format
863
863
  msgid ""
864
864
  "Your map has been cloned! If you want to edit this map from another "
865
865
  "computer, please use this link: %(anonymous_url)s"
866
866
  msgstr ""
867
867
 
868
- #: views.py:1104
868
+ #: views.py:1107
869
869
  msgid "Congratulations, your map has been cloned!"
870
870
  msgstr ""
871
871
 
872
- #: views.py:1358
872
+ #: views.py:1361
873
873
  msgid "Layer successfully deleted."
874
874
  msgstr ""
875
875
 
876
- #: views.py:1380
876
+ #: views.py:1383
877
877
  msgid "Permissions updated with success!"
878
878
  msgstr ""
879
+
880
+ #: views.py:1400
881
+ msgid "Generic"
882
+ msgstr ""
Binary file
@@ -24,7 +24,7 @@ msgid ""
24
24
  msgstr ""
25
25
  "Project-Id-Version: uMap\n"
26
26
  "Report-Msgid-Bugs-To: \n"
27
- "POT-Creation-Date: 2025-06-10 09:19+0000\n"
27
+ "POT-Creation-Date: 2025-07-10 14:12+0000\n"
28
28
  "PO-Revision-Date: 2013-11-22 14:00+0000\n"
29
29
  "Last-Translator: yohanboniface <yohanboniface@free.fr>, 2013-2014,2018-2019,2023-2025\n"
30
30
  "Language-Team: French (http://app.transifex.com/openstreetmap/umap/language/fr/)\n"
@@ -547,7 +547,7 @@ msgstr "Vous êtes maintenant identifié. Merci de patienter..."
547
547
  msgid "template"
548
548
  msgstr "modèle"
549
549
 
550
- #: templates/umap/map_list.html:18 views.py:458
550
+ #: templates/umap/map_list.html:18 views.py:459
551
551
  msgid "by"
552
552
  msgstr "par"
553
553
 
@@ -828,70 +828,74 @@ msgstr "Créer un modèle"
828
828
  msgid "No template found."
829
829
  msgstr "Aucun modèle trouvé."
830
830
 
831
- #: views.py:233
831
+ #: views.py:235
832
832
  msgid "Cannot delete a team with more than one member"
833
833
  msgstr "Impossible de supprimer une équipe ayant plus d'un membre"
834
834
 
835
- #: views.py:237
835
+ #: views.py:239
836
836
  #, python-format
837
837
  msgid "Team “%(name)s” has been deleted"
838
838
  msgstr "L'équipe «%(name)s» a été supprimée"
839
839
 
840
- #: views.py:463
840
+ #: views.py:464
841
841
  msgid "View the map"
842
842
  msgstr "Voir la carte"
843
843
 
844
- #: views.py:864
844
+ #: views.py:865
845
845
  msgid "See full screen"
846
846
  msgstr "Plein écran"
847
847
 
848
- #: views.py:1007
848
+ #: views.py:1008
849
849
  msgid "Map editors updated with success!"
850
850
  msgstr "Éditeurs de la carte mis à jour !"
851
851
 
852
- #: views.py:1043
852
+ #: views.py:1044
853
853
  #, python-format
854
854
  msgid "The uMap edit link for your map: %(map_name)s"
855
855
  msgstr "Le lien d'édition uMap pour votre carte : %(map_name)s"
856
856
 
857
- #: views.py:1046
857
+ #: views.py:1047
858
858
  #, python-format
859
859
  msgid "Here is your secret edit link: %(link)s"
860
860
  msgstr "Voici votre lien d'édition secret : %(link)s"
861
861
 
862
- #: views.py:1053
862
+ #: views.py:1054
863
863
  #, python-format
864
864
  msgid "Can't send email to %(email)s"
865
865
  msgstr "Impossible d'envoyer un courriel vers %(email)s"
866
866
 
867
- #: views.py:1056
867
+ #: views.py:1057
868
868
  #, python-format
869
869
  msgid "Email sent to %(email)s"
870
870
  msgstr "Courriel envoyé à %(email)s"
871
871
 
872
- #: views.py:1067
872
+ #: views.py:1068
873
873
  msgid "Only its owner can delete the map."
874
874
  msgstr "Seul le créateur de la carte peut la supprimer."
875
875
 
876
- #: views.py:1073
876
+ #: views.py:1074
877
877
  msgid "Map successfully deleted."
878
878
  msgstr "La carte a bien été supprimée."
879
879
 
880
- #: views.py:1099
880
+ #: views.py:1100
881
881
  #, python-format
882
882
  msgid ""
883
883
  "Your map has been cloned! If you want to edit this map from another "
884
884
  "computer, please use this link: %(anonymous_url)s"
885
885
  msgstr "Votre carte a été dupliquée ! Si vous souhaitez la modifier depuis un autre ordinateur, veuillez utiliser ce lien : %(anonymous_url)s"
886
886
 
887
- #: views.py:1104
887
+ #: views.py:1105
888
888
  msgid "Congratulations, your map has been cloned!"
889
889
  msgstr "Votre carte a été dupliquée !"
890
890
 
891
- #: views.py:1358
891
+ #: views.py:1359
892
892
  msgid "Layer successfully deleted."
893
893
  msgstr "Calque supprimé."
894
894
 
895
- #: views.py:1380
895
+ #: views.py:1381
896
896
  msgid "Permissions updated with success!"
897
897
  msgstr "Les permissions ont bien été modifiées !"
898
+
899
+ #: views.py:1398
900
+ msgid "Generic"
901
+ msgstr "Générique"
@@ -0,0 +1,29 @@
1
+ import shutil
2
+ import sys
3
+ from pathlib import Path
4
+
5
+ from django.core.management.base import BaseCommand
6
+
7
+ from umap.models import Pictogram
8
+
9
+
10
+ class Command(BaseCommand):
11
+ help = "Export pictogram to some given folder."
12
+
13
+ def add_arguments(self, parser):
14
+ parser.add_argument("dest", help="Destination folder to export pictograms")
15
+
16
+ def handle(self, *args, **options):
17
+ dest = Path(options["dest"])
18
+ if not dest.exists():
19
+ sys.exit("Destination does not exist", dest)
20
+
21
+ for picto in Pictogram.objects.all():
22
+ parent = dest
23
+ if picto.category:
24
+ parent = parent / picto.category.replace("/", "-")
25
+ parent.mkdir(exist_ok=True)
26
+ path = parent / Path(picto.pictogram.name).name
27
+ shutil.copy2(picto.pictogram.path, path)
28
+ if options["verbosity"] > 1:
29
+ print("Copied", picto.pictogram.path, "to", path)
@@ -1,3 +1,5 @@
1
+ from pathlib import Path
2
+
1
3
  from django.conf import settings
2
4
  from django.core.files.storage import FileSystemStorage
3
5
  from django.core.management.base import BaseCommand
@@ -25,7 +27,9 @@ class Command(BaseCommand):
25
27
  fs_storage = FileSystemStorage()
26
28
  for picto in Pictogram.objects.all():
27
29
  fs_path = str(picto.pictogram)
28
- picto.pictogram.save(picto.pictogram.name, fs_storage.open(fs_path))
30
+ picto.pictogram.save(
31
+ Path(picto.pictogram.name).name, fs_storage.open(fs_path)
32
+ )
29
33
  if options["verbosity"] > 1:
30
34
  print("Migrated:", fs_path)
31
35
  else:
@@ -49,14 +49,16 @@ class Command(BaseCommand):
49
49
  layer_id = layer.uuid
50
50
  layer_name = layer.name
51
51
  last_modified = layer.modified_at.date()
52
- deleted = 0
52
+ deleted = layer.geojson.storage.purge_old_versions(
53
+ layer, keep=1, dry_run=options["dry_run"]
54
+ )
55
+ total_deleted += deleted
53
56
  if not options["dry_run"]:
54
- deleted = layer.geojson.storage.purge_old_versions(layer, keep=1)
55
57
  layer.geojson.storage.purge_gzip(layer)
56
- total_deleted += deleted
57
- print(
58
- f"Deleted {deleted} old versions of `{layer_name}` ({layer_id}), unmodified since {last_modified}"
59
- )
58
+ if (deleted and options["verbosity"] > 0) or options["verbosity"] > 1:
59
+ print(
60
+ f"Deleted {deleted} old versions of `{layer_name}` ({layer_id}), unmodified since {last_modified}"
61
+ )
60
62
  if not options["dry_run"]:
61
63
  print(f"Successfully deleted {total_deleted} geojson files.")
62
64
  else:
umap/settings/__init__.py CHANGED
@@ -1,7 +1,9 @@
1
1
  import os
2
2
  import sys
3
3
  import types
4
+ from pathlib import Path
4
5
 
6
+ from django.core.exceptions import ImproperlyConfigured
5
7
  from django.utils.termcolors import colorize
6
8
 
7
9
  from .base import * # NOQA, default values
@@ -44,4 +46,23 @@ if path:
44
46
  elif key == "UMAP_FEEDBACK_LINK":
45
47
  globals()["UMAP_HELP_URL"] = value
46
48
  else:
49
+ if key == "UMAP_PICTOGRAMS_COLLECTIONS" and value:
50
+ for name, options in value.items():
51
+ # relative path will be looked relatively to the STATIC_ROOT
52
+ path = Path(options["path"])
53
+ if not path.is_absolute():
54
+ continue
55
+ if not path.exists():
56
+ msg = (
57
+ f"UMAP_PICTOGRAMS_COLLECTIONS defines path {path} but it does "
58
+ "not exist"
59
+ )
60
+ raise ImproperlyConfigured(msg)
61
+ if not (path / "pictograms").exists():
62
+ msg = (
63
+ f"UMAP_PICTOGRAMS_COLLECTIONS defines path {path} but it does "
64
+ "not have a 'pictograms' root folder"
65
+ )
66
+ raise ImproperlyConfigured(msg)
67
+ globals()["STATICFILES_DIRS"].append(path)
47
68
  globals()[key] = value
umap/settings/base.py CHANGED
@@ -341,6 +341,7 @@ LOCALE_PATHS = [os.path.join(PROJECT_DIR, "locale")]
341
341
  LEAFLET_LONGITUDE = env.int("LEAFLET_LONGITUDE", default=2)
342
342
  LEAFLET_LATITUDE = env.int("LEAFLET_LATITUDE", default=51)
343
343
  LEAFLET_ZOOM = env.int("LEAFLET_ZOOM", default=6)
344
+ UMAP_PICTOGRAMS_COLLECTIONS = {}
344
345
 
345
346
 
346
347
  # =============================================================================
@@ -388,3 +389,5 @@ LOGGING = {
388
389
  REALTIME_ENABLED = env.bool("REALTIME_ENABLED", default=False)
389
390
 
390
391
  REDIS_URL = env("REDIS_URL", default="redis://localhost:6379")
392
+
393
+ OPENROUTESERVICE_APIKEY = env("OPENROUTESERVICE_APIKEY", default=None)
@@ -113,8 +113,9 @@ h2.section {
113
113
  text-align: center;
114
114
  }
115
115
  h2.tabs {
116
- display: flex;
117
- justify-content: space-around;
116
+ display: inline-flex;
117
+ justify-content: left;
118
+ gap: 22px;
118
119
  text-transform: uppercase;
119
120
  color: var(--color-darkBlue);
120
121
  text-align: start;
@@ -136,7 +137,11 @@ h2.tabs a:not(.selected) {
136
137
  }
137
138
  h2.tabs a:hover {
138
139
  text-decoration: underline;
140
+ text-decoration-thickness: 3px;
141
+ text-decoration-skip-ink: none;
142
+ text-underline-offset: 7px;
139
143
  }
144
+
140
145
  .showcase-map .map_fragment {
141
146
  height: 400px;
142
147
  }
@@ -1,6 +1,5 @@
1
1
  .umap-contextmenu {
2
2
  background-color: var(--background-color);
3
- padding: calc(var(--box-padding) / 2) calc(var(--box-padding) / 2);
4
3
  position: fixed;
5
4
  z-index: var(--zindex-contextmenu);
6
5
  border-radius: var(--border-radius);
@@ -8,13 +7,34 @@
8
7
  display: flex;
9
8
  flex-direction: column;
10
9
  }
10
+
11
+ .umap-contextmenu>li {
12
+ background-color: var(--background-color);
13
+ padding-left: calc(var(--box-padding) / 2);
14
+ padding-right: calc(var(--box-padding) / 2);
15
+ }
16
+
17
+ .umap-contextmenu>li:last-of-type {
18
+ padding-bottom: calc(var(--box-padding) / 2);
19
+ border-radius: 0 0 var(--border-radius) var(--border-radius);
20
+ }
21
+
22
+ .umap-contextmenu>li:first-of-type {
23
+ border-radius: var(--border-radius) var(--border-radius) 0 0;
24
+ }
25
+
26
+ .umap-contextmenu>li:first-of-type:not(.dark) {
27
+ padding-top: calc(var(--box-padding) / 2);
28
+ }
29
+
11
30
  .umap-contextmenu-rows {
12
31
  flex-direction: row;
13
32
  align-items: center;
14
33
  justify-content: center;
15
34
  align-content: center;
16
35
  }
17
- .umap-contextmenu:not(.umap-contextmenu-rows) li + li {
36
+
37
+ .umap-contextmenu:not(.umap-contextmenu-rows)>li+li {
18
38
  margin-top: var(--text-margin);
19
39
  }
20
40
 
@@ -23,6 +43,42 @@
23
43
  margin-bottom: var(--text-margin);
24
44
  }
25
45
 
46
+ .umap-contextmenu .dark li button .icon:hover,
26
47
  .dark.umap-contextmenu li button .icon:hover {
27
48
  background-color: var(--color-mediumGray);
28
49
  }
50
+
51
+ .umap-contextmenu .icon-bar {
52
+ display: flex;
53
+ flex-direction: row;
54
+ }
55
+
56
+ .umap-contextmenu .icon-bar button {
57
+ padding: 2px;
58
+ }
59
+
60
+ .umap-contextmenu .icon-bar hr {
61
+ transform: rotate(90deg);
62
+ width: 16px;
63
+ margin: auto 0px;
64
+ }
65
+
66
+ .umap-contextmenu.tooltip-bottom-left,
67
+ .umap-contextmenu.tooltip-bottom-left>li:last-of-type {
68
+ border-bottom-left-radius: unset;
69
+ }
70
+
71
+ .umap-contextmenu.tooltip-bottom-right,
72
+ .umap-contextmenu.tooltip-bottom-right>li:last-of-type {
73
+ border-bottom-right-radius: unset;
74
+ }
75
+
76
+ .umap-contextmenu.tooltip-top-left,
77
+ .umap-contextmenu.tooltip-top-left>li:first-of-type {
78
+ border-top-left-radius: unset;
79
+ }
80
+
81
+ .umap-contextmenu.tooltip-top-right,
82
+ .umap-contextmenu.tooltip-top-right>li:first-of-type {
83
+ border-top-right-radius: unset;
84
+ }