umap-project 3.2.0__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 (173) 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 +15 -15
  4. umap/settings/base.py +2 -0
  5. umap/static/umap/css/contextmenu.css +58 -2
  6. umap/static/umap/css/form.css +175 -45
  7. umap/static/umap/css/icon.css +20 -0
  8. umap/static/umap/img/16-white.svg +21 -40
  9. umap/static/umap/img/16.svg +1 -1
  10. umap/static/umap/img/24-white.svg +9 -9
  11. umap/static/umap/img/24.svg +23 -10
  12. umap/static/umap/img/source/16-white.svg +23 -41
  13. umap/static/umap/img/source/16.svg +1 -1
  14. umap/static/umap/img/source/24-white.svg +11 -11
  15. umap/static/umap/img/source/24.svg +25 -12
  16. umap/static/umap/js/modules/caption.js +8 -0
  17. umap/static/umap/js/modules/data/features.js +317 -173
  18. umap/static/umap/js/modules/data/layer.js +17 -18
  19. umap/static/umap/js/modules/form/builder.js +11 -7
  20. umap/static/umap/js/modules/form/fields.js +10 -7
  21. umap/static/umap/js/modules/formatter.js +42 -20
  22. umap/static/umap/js/modules/importer.js +6 -1
  23. umap/static/umap/js/modules/importers/opendata.js +125 -37
  24. umap/static/umap/js/modules/importers/openrouteservice.js +140 -0
  25. umap/static/umap/js/modules/managers.js +12 -4
  26. umap/static/umap/js/modules/printer.js +107 -0
  27. umap/static/umap/js/modules/rendering/controls.js +78 -2
  28. umap/static/umap/js/modules/rendering/icon.js +113 -82
  29. umap/static/umap/js/modules/rendering/layers/cluster.js +199 -63
  30. umap/static/umap/js/modules/rendering/map.js +5 -1
  31. umap/static/umap/js/modules/rendering/template.js +71 -1
  32. umap/static/umap/js/modules/rendering/ui.js +98 -34
  33. umap/static/umap/js/modules/schema.js +24 -0
  34. umap/static/umap/js/modules/share.js +19 -12
  35. umap/static/umap/js/modules/ui/bar.js +6 -1
  36. umap/static/umap/js/modules/ui/base.js +24 -9
  37. umap/static/umap/js/modules/ui/contextmenu.js +17 -7
  38. umap/static/umap/js/modules/ui/dialog.js +7 -4
  39. umap/static/umap/js/modules/umap.js +67 -61
  40. umap/static/umap/js/umap.controls.js +22 -57
  41. umap/static/umap/locale/am_ET.js +39 -4
  42. umap/static/umap/locale/am_ET.json +39 -4
  43. umap/static/umap/locale/ar.js +39 -4
  44. umap/static/umap/locale/ar.json +39 -4
  45. umap/static/umap/locale/ast.js +39 -4
  46. umap/static/umap/locale/ast.json +39 -4
  47. umap/static/umap/locale/bg.js +39 -4
  48. umap/static/umap/locale/bg.json +39 -4
  49. umap/static/umap/locale/br.js +39 -4
  50. umap/static/umap/locale/br.json +39 -4
  51. umap/static/umap/locale/ca.js +39 -4
  52. umap/static/umap/locale/ca.json +39 -4
  53. umap/static/umap/locale/cs_CZ.js +39 -4
  54. umap/static/umap/locale/cs_CZ.json +39 -4
  55. umap/static/umap/locale/da.js +47 -12
  56. umap/static/umap/locale/da.json +47 -12
  57. umap/static/umap/locale/de.js +39 -4
  58. umap/static/umap/locale/de.json +39 -4
  59. umap/static/umap/locale/el.js +39 -4
  60. umap/static/umap/locale/el.json +39 -4
  61. umap/static/umap/locale/en.js +39 -4
  62. umap/static/umap/locale/en.json +39 -4
  63. umap/static/umap/locale/en_US.json +39 -4
  64. umap/static/umap/locale/es.js +47 -12
  65. umap/static/umap/locale/es.json +47 -12
  66. umap/static/umap/locale/et.js +39 -4
  67. umap/static/umap/locale/et.json +39 -4
  68. umap/static/umap/locale/eu.js +79 -44
  69. umap/static/umap/locale/eu.json +79 -44
  70. umap/static/umap/locale/fa_IR.js +39 -4
  71. umap/static/umap/locale/fa_IR.json +39 -4
  72. umap/static/umap/locale/fi.js +39 -4
  73. umap/static/umap/locale/fi.json +39 -4
  74. umap/static/umap/locale/fr.js +39 -4
  75. umap/static/umap/locale/fr.json +39 -4
  76. umap/static/umap/locale/gl.js +39 -4
  77. umap/static/umap/locale/gl.json +39 -4
  78. umap/static/umap/locale/he.js +39 -4
  79. umap/static/umap/locale/he.json +39 -4
  80. umap/static/umap/locale/hr.js +39 -4
  81. umap/static/umap/locale/hr.json +39 -4
  82. umap/static/umap/locale/hu.js +39 -4
  83. umap/static/umap/locale/hu.json +39 -4
  84. umap/static/umap/locale/id.js +39 -4
  85. umap/static/umap/locale/id.json +39 -4
  86. umap/static/umap/locale/is.js +39 -4
  87. umap/static/umap/locale/is.json +39 -4
  88. umap/static/umap/locale/it.js +39 -4
  89. umap/static/umap/locale/it.json +39 -4
  90. umap/static/umap/locale/ja.js +39 -4
  91. umap/static/umap/locale/ja.json +39 -4
  92. umap/static/umap/locale/ko.js +39 -4
  93. umap/static/umap/locale/ko.json +39 -4
  94. umap/static/umap/locale/lt.js +39 -4
  95. umap/static/umap/locale/lt.json +39 -4
  96. umap/static/umap/locale/ms.js +39 -4
  97. umap/static/umap/locale/ms.json +39 -4
  98. umap/static/umap/locale/nl.js +39 -4
  99. umap/static/umap/locale/nl.json +39 -4
  100. umap/static/umap/locale/no.js +39 -4
  101. umap/static/umap/locale/no.json +39 -4
  102. umap/static/umap/locale/pl.js +39 -4
  103. umap/static/umap/locale/pl.json +39 -4
  104. umap/static/umap/locale/pl_PL.json +39 -4
  105. umap/static/umap/locale/pt.js +39 -4
  106. umap/static/umap/locale/pt.json +39 -4
  107. umap/static/umap/locale/pt_BR.js +39 -4
  108. umap/static/umap/locale/pt_BR.json +39 -4
  109. umap/static/umap/locale/pt_PT.js +39 -4
  110. umap/static/umap/locale/pt_PT.json +39 -4
  111. umap/static/umap/locale/ro.js +39 -4
  112. umap/static/umap/locale/ro.json +39 -4
  113. umap/static/umap/locale/ru.js +39 -4
  114. umap/static/umap/locale/ru.json +39 -4
  115. umap/static/umap/locale/sk_SK.js +39 -4
  116. umap/static/umap/locale/sk_SK.json +39 -4
  117. umap/static/umap/locale/sl.js +39 -4
  118. umap/static/umap/locale/sl.json +39 -4
  119. umap/static/umap/locale/sr.js +39 -4
  120. umap/static/umap/locale/sr.json +39 -4
  121. umap/static/umap/locale/sv.js +39 -4
  122. umap/static/umap/locale/sv.json +39 -4
  123. umap/static/umap/locale/th_TH.js +39 -4
  124. umap/static/umap/locale/th_TH.json +39 -4
  125. umap/static/umap/locale/tr.js +39 -4
  126. umap/static/umap/locale/tr.json +39 -4
  127. umap/static/umap/locale/uk_UA.js +39 -4
  128. umap/static/umap/locale/uk_UA.json +39 -4
  129. umap/static/umap/locale/vi.js +39 -4
  130. umap/static/umap/locale/vi.json +39 -4
  131. umap/static/umap/locale/vi_VN.json +39 -4
  132. umap/static/umap/locale/zh.js +39 -4
  133. umap/static/umap/locale/zh.json +39 -4
  134. umap/static/umap/locale/zh_CN.json +39 -4
  135. umap/static/umap/locale/zh_TW.Big5.json +39 -4
  136. umap/static/umap/locale/zh_TW.js +98 -63
  137. umap/static/umap/locale/zh_TW.json +98 -63
  138. umap/static/umap/map.css +90 -41
  139. umap/static/umap/vars.css +1 -0
  140. umap/static/umap/vendors/editable/Leaflet.Editable.js +3 -1
  141. umap/static/umap/vendors/openrouteservice/ors-js-client.js +521 -0
  142. umap/static/umap/vendors/openrouteservice/ors-js-client.js.map +1 -0
  143. umap/static/umap/vendors/simple-elevation-chart/elevation.js +63 -0
  144. umap/static/umap/vendors/simple-elevation-chart/elevation.svg +8 -0
  145. umap/static/umap/vendors/snapdom/snapdom.min.mjs +3 -0
  146. umap/storage/staticfiles.py +12 -0
  147. umap/templates/umap/css.html +0 -4
  148. umap/templates/umap/js.html +1 -3
  149. umap/tests/integration/test_basics.py +2 -0
  150. umap/tests/integration/test_conditional_rules.py +17 -17
  151. umap/tests/integration/test_datalayer.py +1 -1
  152. umap/tests/integration/test_draw_polygon.py +3 -5
  153. umap/tests/integration/test_draw_polyline.py +4 -6
  154. umap/tests/integration/test_draw_route.py +178 -0
  155. umap/tests/integration/test_edit_map.py +1 -1
  156. umap/tests/integration/test_edit_marker.py +7 -7
  157. umap/tests/integration/test_edit_polygon.py +2 -2
  158. umap/tests/integration/test_export_map.py +74 -10
  159. umap/tests/integration/test_map_preview.py +1 -1
  160. umap/tests/integration/test_share.py +1 -1
  161. umap/tests/integration/test_tableeditor.py +4 -4
  162. umap/tests/integration/test_websocket_sync.py +4 -4
  163. umap/utils.py +5 -1
  164. umap/views.py +2 -0
  165. {umap_project-3.2.0.dist-info → umap_project-3.3.0.dist-info}/METADATA +8 -8
  166. {umap_project-3.2.0.dist-info → umap_project-3.3.0.dist-info}/RECORD +169 -165
  167. umap/static/umap/vendors/markercluster/MarkerCluster.Default.css +0 -60
  168. umap/static/umap/vendors/markercluster/MarkerCluster.css +0 -14
  169. umap/static/umap/vendors/markercluster/leaflet.markercluster.js +0 -2
  170. umap/static/umap/vendors/markercluster/leaflet.markercluster.js.map +0 -1
  171. {umap_project-3.2.0.dist-info → umap_project-3.3.0.dist-info}/WHEEL +0 -0
  172. {umap_project-3.2.0.dist-info → umap_project-3.3.0.dist-info}/entry_points.txt +0 -0
  173. {umap_project-3.2.0.dist-info → umap_project-3.3.0.dist-info}/licenses/LICENSE +0 -0
umap/static/umap/map.css CHANGED
@@ -42,6 +42,31 @@ html[dir="rtl"] .leaflet-tooltip-pane>* {
42
42
  background-color: var(--color-lightGray);
43
43
  }
44
44
 
45
+ .print-portrait,
46
+ .print-landscape {
47
+ left: initial !important;
48
+ right: initial !important;
49
+ top: initial !important;
50
+ bottom: initial !important;
51
+ height: initial !important;
52
+ }
53
+
54
+ .print-a4.print-landscape {
55
+ aspect-ratio: 297/210;
56
+ }
57
+
58
+ .print-a4.print-portrait {
59
+ aspect-ratio: 210/297;
60
+ }
61
+
62
+ .print-usletter.print-landscape {
63
+ aspect-ratio: 11/8.5;
64
+ }
65
+
66
+ .print-usletter.print-portrait {
67
+ aspect-ratio: 8.5/11;
68
+ }
69
+
45
70
  /* *********** */
46
71
  /* Structure */
47
72
  /* *********** */
@@ -96,17 +121,21 @@ html[dir="rtl"] .leaflet-tooltip-pane>* {
96
121
  .leaflet-control-locate a,
97
122
  .umap-control a,
98
123
  .umap-control [type="button"] {
99
- background-position: 50% 50%;
100
- background-repeat: no-repeat;
101
124
  display: block;
102
125
  height: var(--control-size);
103
126
  width: var(--control-size);
104
127
  line-height: var(--control-size);
105
- background-image: url('./img/24.svg');
106
- text-indent: -9999px;
107
128
  margin-bottom: 0;
108
129
  background-color: white;
109
130
  min-height: initial;
131
+ padding: 0;
132
+ }
133
+
134
+ .leaflet-measure-control a,
135
+ .leaflet-control-locate a {
136
+ background-position: 50% 50%;
137
+ background-repeat: no-repeat;
138
+ background-image: url('./img/24.svg');
110
139
  }
111
140
 
112
141
  .leaflet-control.display-on-more {
@@ -595,15 +624,6 @@ ul.photon-autocomplete {
595
624
  /* ********************************* */
596
625
  /* Browser panel */
597
626
  /* ********************************* */
598
- a.umap-control-browse,
599
- .umap-control-browse [type="button"] {
600
- background-position: -144px -180px;
601
- }
602
-
603
- a.umap-control-caption,
604
- .umap-control-caption [type="button"] {
605
- background-position: -144px -36px;
606
- }
607
627
 
608
628
  .leaflet-inplace-toolbar a {
609
629
  background-repeat: no-repeat;
@@ -844,15 +864,21 @@ a.umap-control-caption,
844
864
  .rules-caption .color-box {
845
865
  width: 24px;
846
866
  height: 24px;
867
+ line-height: 24px;
847
868
  display: inline-block;
848
869
  margin-right: var(--text-margin);
849
870
  vertical-align: middle;
871
+ text-align: center;
872
+ }
873
+
874
+ .rules-caption .color-box img {
875
+ vertical-align: middle;
850
876
  }
851
877
 
852
878
  /* ************* */
853
879
  /* Marker's Icon */
854
880
  /* ************* */
855
- .umap-div-icon .icon_container {
881
+ .umap-div-icon .icon-container {
856
882
  background-color: white;
857
883
  border-radius: 4px 4px 4px 4px;
858
884
  height: 32px;
@@ -864,7 +890,7 @@ a.umap-control-caption,
864
890
  line-height: 32px;
865
891
  }
866
892
 
867
- .umap-div-icon.umap-icon-active .icon_container {
893
+ .umap-div-icon.umap-icon-active .icon-container {
868
894
  border-radius: 5px;
869
895
  box-shadow: 7px 10px 10px -1px black;
870
896
  height: 36px;
@@ -875,14 +901,14 @@ a.umap-control-caption,
875
901
  width: 36px;
876
902
  }
877
903
 
878
- .umap-div-icon .icon_container img {
904
+ .umap-div-icon .icon-container img {
879
905
  vertical-align: middle;
880
906
  max-width: 24px !important;
881
907
  /* leaflet.css has !important, so... */
882
908
  max-height: 24px !important;
883
909
  }
884
910
 
885
- .umap-div-icon .icon_arrow {
911
+ .umap-div-icon .icon-arrow {
886
912
  border-left: 8px solid transparent;
887
913
  border-right: 8px solid transparent;
888
914
  border-top: 8px solid #2270b5;
@@ -893,11 +919,11 @@ a.umap-control-caption,
893
919
  opacity: 0.9;
894
920
  }
895
921
 
896
- .umap-div-icon.umap-icon-active .icon_arrow {
922
+ .umap-div-icon.umap-icon-active .icon-arrow {
897
923
  opacity: 1.0 !important;
898
924
  }
899
925
 
900
- .umap-drop-icon .icon_arrow {
926
+ .umap-drop-icon .icon-arrow {
901
927
  border-left: 10px solid transparent;
902
928
  border-right: 10px solid transparent;
903
929
  border-top: 16px solid #2270B5;
@@ -908,7 +934,7 @@ a.umap-control-caption,
908
934
  width: 0;
909
935
  }
910
936
 
911
- .umap-drop-icon.umap-icon-active .icon_arrow {
937
+ .umap-drop-icon.umap-icon-active .icon-arrow {
912
938
  border-left-width: 12px;
913
939
  border-right-width: 12px;
914
940
  border-top-width: 18px;
@@ -916,7 +942,7 @@ a.umap-control-caption,
916
942
  opacity: 1.0 !important;
917
943
  }
918
944
 
919
- .umap-drop-icon .icon_container {
945
+ .umap-drop-icon .icon-container {
920
946
  background-color: #2470B5;
921
947
  border-radius: 16px 16px 16px 16px;
922
948
  box-shadow: 6px 13px 8px -4px black;
@@ -927,7 +953,7 @@ a.umap-control-caption,
927
953
  width: 32px;
928
954
  }
929
955
 
930
- .umap-drop-icon.umap-icon-active .icon_container {
956
+ .umap-drop-icon.umap-icon-active .icon-container {
931
957
  box-shadow: 4px 11px 10px -2px black;
932
958
  border-radius: 18px 18px 18px 18px;
933
959
  height: 36px;
@@ -938,36 +964,48 @@ a.umap-control-caption,
938
964
  width: 36px;
939
965
  }
940
966
 
941
- .umap-drop-icon .icon_container img {
967
+ .umap-drop-icon .icon-container img {
942
968
  vertical-align: middle;
943
969
  max-width: 24px !important;
944
970
  max-height: 24px !important;
945
971
  }
946
972
 
947
- .umap-div-icon .icon_container span,
948
- .umap-drop-icon .icon_container span {
973
+ .umap-div-icon .icon-container span,
974
+ .umap-drop-icon .icon-container span {
949
975
  vertical-align: middle;
950
976
  font-weight: bold;
951
977
  }
952
978
 
953
979
  .umap-circle-icon {
954
- border: 1px solid white;
955
- border-radius: 10px 10px 10px 10px;
956
- margin-inline-start: -6px;
957
- margin-top: -6px;
980
+ border: 2px solid white;
981
+ border-radius: 50%;
958
982
  height: 12px;
959
983
  width: 12px;
960
984
  }
961
985
 
962
986
  .umap-circle-icon.umap-icon-active {
963
- height: 16px;
964
- margin-inline-start: -8px;
965
- margin-top: -8px;
966
987
  opacity: 1.0 !important;
988
+ height: 16px;
967
989
  width: 16px;
968
990
  }
969
991
 
970
- .umap-ball-icon .icon_container {
992
+ .umap-large-circle-icon {
993
+ border: 2px solid white;
994
+ background-color: white;
995
+ border-radius: 50%;
996
+ height: 36px;
997
+ width: 36px;
998
+ box-shadow: black 0px 0px 1px;
999
+ display: flex;
1000
+ align-content: center;
1001
+ }
1002
+
1003
+ .umap-large-circle-icon.umap-icon-active {
1004
+ opacity: 1.0 !important;
1005
+ box-shadow: var(--block-shadow);
1006
+ }
1007
+
1008
+ .umap-ball-icon .icon-container {
971
1009
  background-color: darkblue;
972
1010
  background: radial-gradient(circle at 6px 38%, white -4px, darkblue 8px) repeat scroll 0 0 transparent;
973
1011
  border-radius: 8px 8px 8px 8px;
@@ -978,7 +1016,7 @@ a.umap-control-caption,
978
1016
  width: 16px;
979
1017
  }
980
1018
 
981
- .umap-ball-icon.umap-icon-active .icon_container {
1019
+ .umap-ball-icon.umap-icon-active .icon-container {
982
1020
  border-radius: 10px 10px 10px 10px;
983
1021
  box-shadow: 1px 23px 7px -1px black;
984
1022
  margin-inline-start: -2px;
@@ -988,7 +1026,7 @@ a.umap-control-caption,
988
1026
  width: 20px;
989
1027
  }
990
1028
 
991
- .umap-ball-icon .icon_arrow {
1029
+ .umap-ball-icon .icon-arrow {
992
1030
  background-color: black;
993
1031
  height: 16px;
994
1032
  inset-inline-start: 7px;
@@ -1006,24 +1044,35 @@ a.umap-control-caption,
1006
1044
  cursor: not-allowed;
1007
1045
  }
1008
1046
 
1009
- .leaflet-container .umap-raw-icon img {
1010
- max-height: 48px !important;
1011
- max-width: 48px !important;
1012
- }
1013
-
1014
1047
  .umap-raw-icon {
1015
1048
  display: flex;
1016
1049
  flex-direction: column;
1017
1050
  justify-content: center;
1018
- align-items: center;
1019
1051
  align-content: center;
1020
1052
  overflow: hidden;
1021
1053
  }
1022
1054
 
1055
+ .umap-raw-icon img {
1056
+ object-fit: contain;
1057
+ }
1058
+
1023
1059
  .umap-raw-icon.umap-icon-active {
1024
1060
  box-shadow: var(--block-shadow);
1025
1061
  }
1026
1062
 
1063
+ .umap-cluster-icon {
1064
+ border-radius: 50%;
1065
+ border: 4px solid white;
1066
+ display: flex;
1067
+ justify-content: center;
1068
+ align-items: center;
1069
+ font-weight: bold;
1070
+ }
1071
+
1072
+ .leaflet-overlay-pane > svg {
1073
+ z-index: var(--zindex-orphan-marker);
1074
+ }
1075
+
1027
1076
  /* ********************************* */
1028
1077
  /* Ajax loader */
1029
1078
  /* ********************************* */
umap/static/umap/vars.css CHANGED
@@ -61,6 +61,7 @@
61
61
  --zindex-panels: 440;
62
62
  --zindex-controls: 430;
63
63
  --zindex-dragover: 410;
64
+ --zindex-orphan-marker: 401;
64
65
 
65
66
  --block-shadow: 0 1px 7px var(--color-mediumGray);
66
67
  }
@@ -814,6 +814,8 @@
814
814
  // 🍂namespace Editable; 🍂class BaseEditor; 🍂aka L.Editable.BaseEditor
815
815
  // When editing a feature (Marker, Polyline…), an editor is attached to it. This
816
816
  // editor basically knows how to handle the edition.
817
+ // 🍂option draggable: boolean = false
818
+ // Disable dragging of the feature while in edit mode
817
819
  L.Editable.BaseEditor = L.Handler.extend({
818
820
  initialize: function (map, feature, options) {
819
821
  L.setOptions(this, options)
@@ -854,7 +856,7 @@
854
856
 
855
857
  onFeatureAdd: function () {
856
858
  this.tools.editLayer.addLayer(this.editLayer)
857
- if (this.feature.dragging) this.feature.dragging.enable()
859
+ if (this.feature.dragging && this.options.draggable != false) this.feature.dragging.enable()
858
860
  },
859
861
 
860
862
  hasMiddleMarkers: function () {