umap-project 2.9.2__py3-none-any.whl → 3.0.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 (222) hide show
  1. umap/__init__.py +1 -1
  2. umap/context_processors.py +1 -0
  3. umap/forms.py +1 -2
  4. umap/locale/de/LC_MESSAGES/django.mo +0 -0
  5. umap/locale/de/LC_MESSAGES/django.po +218 -96
  6. umap/locale/en/LC_MESSAGES/django.po +131 -55
  7. umap/locale/et/LC_MESSAGES/django.mo +0 -0
  8. umap/locale/et/LC_MESSAGES/django.po +175 -130
  9. umap/locale/eu/LC_MESSAGES/django.mo +0 -0
  10. umap/locale/eu/LC_MESSAGES/django.po +117 -72
  11. umap/locale/fr/LC_MESSAGES/django.mo +0 -0
  12. umap/locale/fr/LC_MESSAGES/django.po +132 -56
  13. umap/locale/hu/LC_MESSAGES/django.mo +0 -0
  14. umap/locale/hu/LC_MESSAGES/django.po +209 -88
  15. umap/locale/is/LC_MESSAGES/django.mo +0 -0
  16. umap/locale/is/LC_MESSAGES/django.po +296 -175
  17. umap/middleware.py +2 -1
  18. umap/migrations/0027_map_tags.py +23 -0
  19. umap/models.py +13 -2
  20. umap/settings/base.py +23 -5
  21. umap/static/umap/base.css +41 -8
  22. umap/static/umap/content.css +72 -37
  23. umap/static/umap/css/bar.css +43 -21
  24. umap/static/umap/css/dialog.css +4 -1
  25. umap/static/umap/css/form.css +40 -27
  26. umap/static/umap/css/icon.css +11 -1
  27. umap/static/umap/css/importers.css +7 -0
  28. umap/static/umap/img/16-white.svg +23 -2
  29. umap/static/umap/img/16.svg +1 -1
  30. umap/static/umap/img/24.svg +4 -4
  31. umap/static/umap/img/home.svg +7 -0
  32. umap/static/umap/img/importers/banfr.svg +1 -0
  33. umap/static/umap/img/marker.svg +2 -5
  34. umap/static/umap/img/source/16-white.svg +24 -3
  35. umap/static/umap/img/source/16.svg +1 -1
  36. umap/static/umap/img/source/24.svg +5 -5
  37. umap/static/umap/img/target.svg +1 -0
  38. umap/static/umap/js/components/alerts/alert.js +0 -1
  39. umap/static/umap/js/modules/browser.js +4 -4
  40. umap/static/umap/js/modules/caption.js +1 -1
  41. umap/static/umap/js/modules/data/features.js +25 -25
  42. umap/static/umap/js/modules/data/layer.js +91 -97
  43. umap/static/umap/js/modules/facets.js +9 -5
  44. umap/static/umap/js/modules/form/builder.js +21 -29
  45. umap/static/umap/js/modules/form/fields.js +40 -14
  46. umap/static/umap/js/modules/formatter.js +1 -1
  47. umap/static/umap/js/modules/global.js +9 -5
  48. umap/static/umap/js/modules/help.js +18 -5
  49. umap/static/umap/js/modules/importer.js +5 -2
  50. umap/static/umap/js/modules/importers/banfr.js +93 -0
  51. umap/static/umap/js/modules/importers/cadastrefr.js +2 -2
  52. umap/static/umap/js/modules/importers/communesfr.js +1 -1
  53. umap/static/umap/js/modules/permissions.js +20 -10
  54. umap/static/umap/js/modules/rendering/icon.js +15 -2
  55. umap/static/umap/js/modules/rendering/layers/classified.js +7 -7
  56. umap/static/umap/js/modules/rendering/layers/cluster.js +2 -2
  57. umap/static/umap/js/modules/rendering/layers/heat.js +4 -4
  58. umap/static/umap/js/modules/rendering/map.js +14 -6
  59. umap/static/umap/js/modules/rendering/popup.js +2 -2
  60. umap/static/umap/js/modules/rendering/template.js +3 -3
  61. umap/static/umap/js/modules/rendering/ui.js +17 -11
  62. umap/static/umap/js/modules/rules.js +13 -16
  63. umap/static/umap/js/modules/schema.js +23 -1
  64. umap/static/umap/js/modules/share.js +1 -1
  65. umap/static/umap/js/modules/slideshow.js +1 -0
  66. umap/static/umap/js/modules/sync/engine.js +141 -19
  67. umap/static/umap/js/modules/sync/undo.js +101 -0
  68. umap/static/umap/js/modules/sync/updaters.js +51 -28
  69. umap/static/umap/js/modules/tableeditor.js +1 -1
  70. umap/static/umap/js/modules/ui/bar.js +61 -21
  71. umap/static/umap/js/modules/ui/tooltip.js +1 -1
  72. umap/static/umap/js/modules/umap.js +190 -176
  73. umap/static/umap/js/modules/utils.js +30 -4
  74. umap/static/umap/js/umap.controls.js +82 -38
  75. umap/static/umap/locale/am_ET.js +13 -7
  76. umap/static/umap/locale/am_ET.json +13 -7
  77. umap/static/umap/locale/ar.js +13 -7
  78. umap/static/umap/locale/ar.json +13 -7
  79. umap/static/umap/locale/ast.js +13 -7
  80. umap/static/umap/locale/ast.json +13 -7
  81. umap/static/umap/locale/bg.js +13 -7
  82. umap/static/umap/locale/bg.json +13 -7
  83. umap/static/umap/locale/br.js +13 -8
  84. umap/static/umap/locale/br.json +13 -8
  85. umap/static/umap/locale/ca.js +13 -7
  86. umap/static/umap/locale/ca.json +13 -7
  87. umap/static/umap/locale/cs_CZ.js +26 -20
  88. umap/static/umap/locale/cs_CZ.json +26 -20
  89. umap/static/umap/locale/da.js +13 -7
  90. umap/static/umap/locale/da.json +13 -7
  91. umap/static/umap/locale/de.js +47 -41
  92. umap/static/umap/locale/de.json +47 -41
  93. umap/static/umap/locale/el.js +13 -7
  94. umap/static/umap/locale/el.json +13 -7
  95. umap/static/umap/locale/en.js +12 -7
  96. umap/static/umap/locale/en.json +12 -7
  97. umap/static/umap/locale/en_US.json +13 -7
  98. umap/static/umap/locale/es.js +19 -13
  99. umap/static/umap/locale/es.json +19 -13
  100. umap/static/umap/locale/et.js +13 -7
  101. umap/static/umap/locale/et.json +13 -7
  102. umap/static/umap/locale/eu.js +43 -37
  103. umap/static/umap/locale/eu.json +43 -37
  104. umap/static/umap/locale/fa_IR.js +13 -7
  105. umap/static/umap/locale/fa_IR.json +13 -7
  106. umap/static/umap/locale/fi.js +13 -7
  107. umap/static/umap/locale/fi.json +13 -7
  108. umap/static/umap/locale/fr.js +12 -7
  109. umap/static/umap/locale/fr.json +12 -7
  110. umap/static/umap/locale/gl.js +19 -13
  111. umap/static/umap/locale/gl.json +19 -13
  112. umap/static/umap/locale/he.js +13 -7
  113. umap/static/umap/locale/he.json +13 -7
  114. umap/static/umap/locale/hr.js +13 -7
  115. umap/static/umap/locale/hr.json +13 -7
  116. umap/static/umap/locale/hu.js +25 -19
  117. umap/static/umap/locale/hu.json +25 -19
  118. umap/static/umap/locale/id.js +13 -7
  119. umap/static/umap/locale/id.json +13 -7
  120. umap/static/umap/locale/is.js +151 -145
  121. umap/static/umap/locale/is.json +151 -145
  122. umap/static/umap/locale/it.js +13 -7
  123. umap/static/umap/locale/it.json +13 -7
  124. umap/static/umap/locale/ja.js +13 -7
  125. umap/static/umap/locale/ja.json +13 -7
  126. umap/static/umap/locale/ko.js +13 -7
  127. umap/static/umap/locale/ko.json +13 -7
  128. umap/static/umap/locale/lt.js +13 -7
  129. umap/static/umap/locale/lt.json +13 -7
  130. umap/static/umap/locale/ms.js +13 -7
  131. umap/static/umap/locale/ms.json +13 -7
  132. umap/static/umap/locale/nl.js +12 -7
  133. umap/static/umap/locale/nl.json +12 -7
  134. umap/static/umap/locale/no.js +13 -7
  135. umap/static/umap/locale/no.json +13 -7
  136. umap/static/umap/locale/pl.js +13 -7
  137. umap/static/umap/locale/pl.json +13 -7
  138. umap/static/umap/locale/pl_PL.json +13 -7
  139. umap/static/umap/locale/pt.js +12 -7
  140. umap/static/umap/locale/pt.json +12 -7
  141. umap/static/umap/locale/pt_BR.js +13 -7
  142. umap/static/umap/locale/pt_BR.json +13 -7
  143. umap/static/umap/locale/pt_PT.js +13 -7
  144. umap/static/umap/locale/pt_PT.json +13 -7
  145. umap/static/umap/locale/ro.js +13 -7
  146. umap/static/umap/locale/ro.json +13 -7
  147. umap/static/umap/locale/ru.js +13 -7
  148. umap/static/umap/locale/ru.json +13 -7
  149. umap/static/umap/locale/sk_SK.js +13 -7
  150. umap/static/umap/locale/sk_SK.json +13 -7
  151. umap/static/umap/locale/sl.js +13 -7
  152. umap/static/umap/locale/sl.json +13 -7
  153. umap/static/umap/locale/sr.js +13 -7
  154. umap/static/umap/locale/sr.json +13 -7
  155. umap/static/umap/locale/sv.js +13 -7
  156. umap/static/umap/locale/sv.json +13 -7
  157. umap/static/umap/locale/th_TH.js +13 -7
  158. umap/static/umap/locale/th_TH.json +13 -7
  159. umap/static/umap/locale/tr.js +13 -7
  160. umap/static/umap/locale/tr.json +13 -7
  161. umap/static/umap/locale/uk_UA.js +13 -7
  162. umap/static/umap/locale/uk_UA.json +13 -7
  163. umap/static/umap/locale/vi.js +13 -7
  164. umap/static/umap/locale/vi.json +13 -7
  165. umap/static/umap/locale/vi_VN.json +13 -7
  166. umap/static/umap/locale/zh.js +13 -7
  167. umap/static/umap/locale/zh.json +13 -7
  168. umap/static/umap/locale/zh_CN.json +13 -7
  169. umap/static/umap/locale/zh_TW.Big5.json +13 -7
  170. umap/static/umap/locale/zh_TW.js +19 -13
  171. umap/static/umap/locale/zh_TW.json +19 -13
  172. umap/static/umap/map.css +58 -28
  173. umap/static/umap/unittests/sync.js +0 -57
  174. umap/static/umap/unittests/utils.js +47 -0
  175. umap/static/umap/vars.css +5 -2
  176. umap/static/umap/vendors/photon/leaflet.photon.js +3 -0
  177. umap/sync/payloads.py +3 -2
  178. umap/templates/auth/user_detail.html +1 -1
  179. umap/templates/auth/user_stars.html +1 -1
  180. umap/templates/umap/content.html +17 -12
  181. umap/templates/umap/home.html +7 -5
  182. umap/templates/umap/map_fragment.html +1 -1
  183. umap/templates/umap/map_list.html +20 -13
  184. umap/templates/umap/search.html +7 -3
  185. umap/templates/umap/search_bar.html +13 -11
  186. umap/templates/umap/team_detail.html +1 -1
  187. umap/tests/base.py +2 -1
  188. umap/tests/fixtures/remote_data.umap +55 -0
  189. umap/tests/fixtures/test_upload_data_with_iconurl.umap +122 -0
  190. umap/tests/integration/test_browser.py +1 -3
  191. umap/tests/integration/test_conditional_rules.py +3 -0
  192. umap/tests/integration/test_edit_datalayer.py +2 -7
  193. umap/tests/integration/test_edit_map.py +15 -0
  194. umap/tests/integration/test_edit_polygon.py +1 -2
  195. umap/tests/integration/test_import.py +59 -2
  196. umap/tests/integration/test_optimistic_merge.py +4 -3
  197. umap/tests/integration/test_owned_map.py +0 -1
  198. umap/tests/integration/test_save.py +2 -4
  199. umap/tests/integration/test_undo_redo.py +267 -0
  200. umap/tests/integration/test_websocket_sync.py +78 -11
  201. umap/tests/settings.py +1 -3
  202. umap/tests/test_datalayer_s3.py +1 -0
  203. umap/tests/test_map_views.py +1 -0
  204. umap/tests/test_views.py +34 -0
  205. umap/utils.py +1 -1
  206. umap/views.py +23 -2
  207. {umap_project-2.9.2.dist-info → umap_project-3.0.0.dist-info}/METADATA +13 -12
  208. {umap_project-2.9.2.dist-info → umap_project-3.0.0.dist-info}/RECORD +211 -213
  209. umap/static/umap/js/modules/saving.js +0 -52
  210. umap/static/umap/test/.eslintrc +0 -21
  211. umap/static/umap/test/DataLayer.js +0 -463
  212. umap/static/umap/test/Feature.js +0 -131
  213. umap/static/umap/test/Map.js +0 -37
  214. umap/static/umap/test/Marker.js +0 -126
  215. umap/static/umap/test/Polygon.js +0 -111
  216. umap/static/umap/test/Polyline.js +0 -286
  217. umap/static/umap/test/Util.js +0 -28
  218. umap/static/umap/test/_pre.js +0 -455
  219. umap/static/umap/test/index.html +0 -139
  220. {umap_project-2.9.2.dist-info → umap_project-3.0.0.dist-info}/WHEEL +0 -0
  221. {umap_project-2.9.2.dist-info → umap_project-3.0.0.dist-info}/entry_points.txt +0 -0
  222. {umap_project-2.9.2.dist-info → umap_project-3.0.0.dist-info}/licenses/LICENSE +0 -0
@@ -27,10 +27,7 @@ const locale = {
27
27
  "Allow scroll wheel zoom?": "是否允许滚轮缩放?",
28
28
  "always": "always",
29
29
  "Animated transitions": "Animated transitions",
30
- "Are you sure you want to cancel your changes?": "是否确定取消改变?",
31
30
  "Are you sure you want to clone this map and all its datalayers?": "是否确定复制这个地图及其所有数据图层?",
32
- "Are you sure you want to delete the feature?": "是否确定删除该要素?",
33
- "Are you sure you want to delete this layer?": "Are you sure you want to delete this layer?",
34
31
  "Are you sure you want to delete this map?": "是否确定删除地图?",
35
32
  "Are you sure you want to delete this property on all the features?": "是否确定删除全部要素的该属性?",
36
33
  "Are you sure you want to restore this version?": "Are you sure you want to restore this version?",
@@ -46,7 +43,6 @@ const locale = {
46
43
  "Browse data": "浏览数据",
47
44
  "by": "by",
48
45
  "Cache proxied request": "Cache proxied request",
49
- "Cancel edits": "取消编辑",
50
46
  "Caption": "Caption",
51
47
  "Center map on your location": "Center map on your location",
52
48
  "Change map background": "改变地图背景",
@@ -299,7 +295,6 @@ const locale = {
299
295
  "Restore this version": "Restore this version",
300
296
  "Save current edits": "保存当前编辑内容",
301
297
  "Save map": "Save map",
302
- "Save this location as new feature": "Save this location as new feature",
303
298
  "Save": "保存",
304
299
  "Saved center and zoom": "Saved center and zoom",
305
300
  "Search location": "Search location",
@@ -387,7 +382,6 @@ const locale = {
387
382
  "Zoom to the next": "下一个",
388
383
  "Zoom to the previous": "上一个",
389
384
  "Zoom to this feature": "缩放到该对象",
390
- "Zoom to this place": "Zoom to this place",
391
385
  "{area} acres": "{area} acres",
392
386
  "{area} ha": "{area} ha",
393
387
  "{area} m²": "{area} m²",
@@ -532,7 +526,19 @@ const locale = {
532
526
  "Default latitude": "Default latitude",
533
527
  "Default longitude": "Default longitude",
534
528
  "Edit map default view": "Edit map default view",
535
- "Use current center and zoom": "Use current center and zoom"
529
+ "Use current center and zoom": "Use current center and zoom",
530
+ "Layer permalink": "Layer permalink",
531
+ "Back to home": "Back to home",
532
+ "Home logo": "Home logo",
533
+ "Add this geometry to my map": "Add this geometry to my map",
534
+ "Add this place to my map": "Add this place to my map",
535
+ "Cancel last edit": "Cancel last edit",
536
+ "Redo last edit": "Redo last edit",
537
+ "Links": "Links",
538
+ "Images": "Images",
539
+ "Iframes": "Iframes",
540
+ "Tags": "Tags",
541
+ "Geocode": "Geocode"
536
542
  }
537
543
  L.registerLocale("zh", locale)
538
544
  L.setLocale("zh")
@@ -27,10 +27,7 @@
27
27
  "Allow scroll wheel zoom?": "是否允许滚轮缩放?",
28
28
  "always": "always",
29
29
  "Animated transitions": "Animated transitions",
30
- "Are you sure you want to cancel your changes?": "是否确定取消改变?",
31
30
  "Are you sure you want to clone this map and all its datalayers?": "是否确定复制这个地图及其所有数据图层?",
32
- "Are you sure you want to delete the feature?": "是否确定删除该要素?",
33
- "Are you sure you want to delete this layer?": "Are you sure you want to delete this layer?",
34
31
  "Are you sure you want to delete this map?": "是否确定删除地图?",
35
32
  "Are you sure you want to delete this property on all the features?": "是否确定删除全部要素的该属性?",
36
33
  "Are you sure you want to restore this version?": "Are you sure you want to restore this version?",
@@ -46,7 +43,6 @@
46
43
  "Browse data": "浏览数据",
47
44
  "by": "by",
48
45
  "Cache proxied request": "Cache proxied request",
49
- "Cancel edits": "取消编辑",
50
46
  "Caption": "Caption",
51
47
  "Center map on your location": "Center map on your location",
52
48
  "Change map background": "改变地图背景",
@@ -299,7 +295,6 @@
299
295
  "Restore this version": "Restore this version",
300
296
  "Save current edits": "保存当前编辑内容",
301
297
  "Save map": "Save map",
302
- "Save this location as new feature": "Save this location as new feature",
303
298
  "Save": "保存",
304
299
  "Saved center and zoom": "Saved center and zoom",
305
300
  "Search location": "Search location",
@@ -387,7 +382,6 @@
387
382
  "Zoom to the next": "下一个",
388
383
  "Zoom to the previous": "上一个",
389
384
  "Zoom to this feature": "缩放到该对象",
390
- "Zoom to this place": "Zoom to this place",
391
385
  "{area} acres": "{area} acres",
392
386
  "{area} ha": "{area} ha",
393
387
  "{area} m²": "{area} m²",
@@ -532,5 +526,17 @@
532
526
  "Default latitude": "Default latitude",
533
527
  "Default longitude": "Default longitude",
534
528
  "Edit map default view": "Edit map default view",
535
- "Use current center and zoom": "Use current center and zoom"
529
+ "Use current center and zoom": "Use current center and zoom",
530
+ "Layer permalink": "Layer permalink",
531
+ "Back to home": "Back to home",
532
+ "Home logo": "Home logo",
533
+ "Add this geometry to my map": "Add this geometry to my map",
534
+ "Add this place to my map": "Add this place to my map",
535
+ "Cancel last edit": "Cancel last edit",
536
+ "Redo last edit": "Redo last edit",
537
+ "Links": "Links",
538
+ "Images": "Images",
539
+ "Iframes": "Iframes",
540
+ "Tags": "Tags",
541
+ "Geocode": "Geocode"
536
542
  }
@@ -27,10 +27,7 @@
27
27
  "Allow scroll wheel zoom?": "Allow scroll wheel zoom?",
28
28
  "always": "always",
29
29
  "Animated transitions": "Animated transitions",
30
- "Are you sure you want to cancel your changes?": "Are you sure you want to cancel your changes?",
31
30
  "Are you sure you want to clone this map and all its datalayers?": "Are you sure you want to clone this map and all its datalayers?",
32
- "Are you sure you want to delete the feature?": "Are you sure you want to delete the feature?",
33
- "Are you sure you want to delete this layer?": "Are you sure you want to delete this layer?",
34
31
  "Are you sure you want to delete this map?": "Are you sure you want to delete this map?",
35
32
  "Are you sure you want to delete this property on all the features?": "Are you sure you want to delete this property on all the features?",
36
33
  "Are you sure you want to restore this version?": "Are you sure you want to restore this version?",
@@ -46,7 +43,6 @@
46
43
  "Browse data": "Browse data",
47
44
  "by": "by",
48
45
  "Cache proxied request": "Cache proxied request",
49
- "Cancel edits": "Cancel edits",
50
46
  "Caption": "Caption",
51
47
  "Center map on your location": "Center map on your location",
52
48
  "Change map background": "Change map background",
@@ -299,7 +295,6 @@
299
295
  "Restore this version": "Restore this version",
300
296
  "Save current edits": "Save current edits",
301
297
  "Save map": "Save map",
302
- "Save this location as new feature": "Save this location as new feature",
303
298
  "Save": "Save",
304
299
  "Saved center and zoom": "Saved center and zoom",
305
300
  "Search location": "Search location",
@@ -387,7 +382,6 @@
387
382
  "Zoom to the next": "Zoom to the next",
388
383
  "Zoom to the previous": "Zoom to the previous",
389
384
  "Zoom to this feature": "Zoom to this feature",
390
- "Zoom to this place": "Zoom to this place",
391
385
  "{area} acres": "{area} acres",
392
386
  "{area} ha": "{area} ha",
393
387
  "{area} m²": "{area} m²",
@@ -532,5 +526,17 @@
532
526
  "Default latitude": "Default latitude",
533
527
  "Default longitude": "Default longitude",
534
528
  "Edit map default view": "Edit map default view",
535
- "Use current center and zoom": "Use current center and zoom"
529
+ "Use current center and zoom": "Use current center and zoom",
530
+ "Layer permalink": "Layer permalink",
531
+ "Back to home": "Back to home",
532
+ "Home logo": "Home logo",
533
+ "Add this geometry to my map": "Add this geometry to my map",
534
+ "Add this place to my map": "Add this place to my map",
535
+ "Cancel last edit": "Cancel last edit",
536
+ "Redo last edit": "Redo last edit",
537
+ "Links": "Links",
538
+ "Images": "Images",
539
+ "Iframes": "Iframes",
540
+ "Tags": "Tags",
541
+ "Geocode": "Geocode"
536
542
  }
@@ -27,10 +27,7 @@
27
27
  "Allow scroll wheel zoom?": "Allow scroll wheel zoom?",
28
28
  "always": "always",
29
29
  "Animated transitions": "Animated transitions",
30
- "Are you sure you want to cancel your changes?": "Are you sure you want to cancel your changes?",
31
30
  "Are you sure you want to clone this map and all its datalayers?": "Are you sure you want to clone this map and all its datalayers?",
32
- "Are you sure you want to delete the feature?": "Are you sure you want to delete the feature?",
33
- "Are you sure you want to delete this layer?": "Are you sure you want to delete this layer?",
34
31
  "Are you sure you want to delete this map?": "Are you sure you want to delete this map?",
35
32
  "Are you sure you want to delete this property on all the features?": "Are you sure you want to delete this property on all the features?",
36
33
  "Are you sure you want to restore this version?": "Are you sure you want to restore this version?",
@@ -46,7 +43,6 @@
46
43
  "Browse data": "Browse data",
47
44
  "by": "by",
48
45
  "Cache proxied request": "Cache proxied request",
49
- "Cancel edits": "Cancel edits",
50
46
  "Caption": "Caption",
51
47
  "Center map on your location": "Center map on your location",
52
48
  "Change map background": "Change map background",
@@ -299,7 +295,6 @@
299
295
  "Restore this version": "Restore this version",
300
296
  "Save current edits": "Save current edits",
301
297
  "Save map": "Save map",
302
- "Save this location as new feature": "Save this location as new feature",
303
298
  "Save": "Save",
304
299
  "Saved center and zoom": "Saved center and zoom",
305
300
  "Search location": "Search location",
@@ -387,7 +382,6 @@
387
382
  "Zoom to the next": "Zoom to the next",
388
383
  "Zoom to the previous": "Zoom to the previous",
389
384
  "Zoom to this feature": "Zoom to this feature",
390
- "Zoom to this place": "Zoom to this place",
391
385
  "{area} acres": "{area} acres",
392
386
  "{area} ha": "{area} ha",
393
387
  "{area} m²": "{area} m²",
@@ -532,5 +526,17 @@
532
526
  "Default latitude": "Default latitude",
533
527
  "Default longitude": "Default longitude",
534
528
  "Edit map default view": "Edit map default view",
535
- "Use current center and zoom": "Use current center and zoom"
529
+ "Use current center and zoom": "Use current center and zoom",
530
+ "Layer permalink": "Layer permalink",
531
+ "Back to home": "Back to home",
532
+ "Home logo": "Home logo",
533
+ "Add this geometry to my map": "Add this geometry to my map",
534
+ "Add this place to my map": "Add this place to my map",
535
+ "Cancel last edit": "Cancel last edit",
536
+ "Redo last edit": "Redo last edit",
537
+ "Links": "Links",
538
+ "Images": "Images",
539
+ "Iframes": "Iframes",
540
+ "Tags": "Tags",
541
+ "Geocode": "Geocode"
536
542
  }
@@ -27,10 +27,7 @@ const locale = {
27
27
  "Allow scroll wheel zoom?": "允許捲動放大?",
28
28
  "always": "經常",
29
29
  "Animated transitions": "動畫轉換",
30
- "Are you sure you want to cancel your changes?": "您確定要取消您所做的變更?",
31
30
  "Are you sure you want to clone this map and all its datalayers?": "您確定要複製此地圖及所有資料圖層?",
32
- "Are you sure you want to delete the feature?": "您確定要刪除該圖徵?",
33
- "Are you sure you want to delete this layer?": "你確定要刪除這個圖層嗎?",
34
31
  "Are you sure you want to delete this map?": "您確定要刪除此地圖?",
35
32
  "Are you sure you want to delete this property on all the features?": "您確定要刪除所有圖徵中的此項屬性?",
36
33
  "Are you sure you want to restore this version?": "您確定要回復此一版本嗎?",
@@ -46,7 +43,6 @@ const locale = {
46
43
  "Browse data": "瀏覽資料",
47
44
  "by": "由",
48
45
  "Cache proxied request": "快取代理請求",
49
- "Cancel edits": "取消編輯",
50
46
  "Caption": "標題",
51
47
  "Center map on your location": "將您的位置設為地圖中心",
52
48
  "Change map background": "更改地圖背景",
@@ -299,7 +295,6 @@ const locale = {
299
295
  "Restore this version": "回復此版本",
300
296
  "Save current edits": "儲存近期的變更",
301
297
  "Save map": "儲存地圖",
302
- "Save this location as new feature": "將地點存為新的圖徵",
303
298
  "Save": "儲存",
304
299
  "Saved center and zoom": "儲存地圖中心點位置與縮放大小",
305
300
  "Search location": "搜尋地點",
@@ -387,7 +382,6 @@ const locale = {
387
382
  "Zoom to the next": "切換至下一頁",
388
383
  "Zoom to the previous": "切換至前一頁",
389
384
  "Zoom to this feature": "縮放至圖徵範圍",
390
- "Zoom to this place": "縮放到這個地方",
391
385
  "{area} acres": "{area} 英畝",
392
386
  "{area} ha": "{area} 公頃",
393
387
  "{area} m²": "{area} 平方公尺",
@@ -526,13 +520,25 @@ const locale = {
526
520
  "Cannot parse remote data for layer \"{layer}\" with url \"{url}\"": "無法用網址 \"{url}\" 為圖層 \"{layer}\" 解析遠端資料",
527
521
  "Import failed: invalid data": "匯入失敗:無效的資料",
528
522
  "Anonymous": "暱名",
529
- "created at {date}": "created at {date}",
530
- "modified at {date}": "modified at {date}",
531
- "Default zoom": "Default zoom",
532
- "Default latitude": "Default latitude",
533
- "Default longitude": "Default longitude",
534
- "Edit map default view": "Edit map default view",
535
- "Use current center and zoom": "Use current center and zoom"
523
+ "created at {date}": " {date} 創建",
524
+ "modified at {date}": " {date} 變更",
525
+ "Default zoom": "預設縮放大小",
526
+ "Default latitude": "預設緯度",
527
+ "Default longitude": "預設經度",
528
+ "Edit map default view": "編輯地圖預設檢視",
529
+ "Use current center and zoom": "使用目前中心與縮放大小",
530
+ "Layer permalink": "圖層永久連結",
531
+ "Back to home": "Back to home",
532
+ "Home logo": "Home logo",
533
+ "Add this geometry to my map": "Add this geometry to my map",
534
+ "Add this place to my map": "Add this place to my map",
535
+ "Cancel last edit": "Cancel last edit",
536
+ "Redo last edit": "Redo last edit",
537
+ "Links": "Links",
538
+ "Images": "Images",
539
+ "Iframes": "Iframes",
540
+ "Tags": "Tags",
541
+ "Geocode": "Geocode"
536
542
  }
537
543
  L.registerLocale("zh_TW", locale)
538
544
  L.setLocale("zh_TW")
@@ -27,10 +27,7 @@
27
27
  "Allow scroll wheel zoom?": "允許捲動放大?",
28
28
  "always": "經常",
29
29
  "Animated transitions": "動畫轉換",
30
- "Are you sure you want to cancel your changes?": "您確定要取消您所做的變更?",
31
30
  "Are you sure you want to clone this map and all its datalayers?": "您確定要複製此地圖及所有資料圖層?",
32
- "Are you sure you want to delete the feature?": "您確定要刪除該圖徵?",
33
- "Are you sure you want to delete this layer?": "你確定要刪除這個圖層嗎?",
34
31
  "Are you sure you want to delete this map?": "您確定要刪除此地圖?",
35
32
  "Are you sure you want to delete this property on all the features?": "您確定要刪除所有圖徵中的此項屬性?",
36
33
  "Are you sure you want to restore this version?": "您確定要回復此一版本嗎?",
@@ -46,7 +43,6 @@
46
43
  "Browse data": "瀏覽資料",
47
44
  "by": "由",
48
45
  "Cache proxied request": "快取代理請求",
49
- "Cancel edits": "取消編輯",
50
46
  "Caption": "標題",
51
47
  "Center map on your location": "將您的位置設為地圖中心",
52
48
  "Change map background": "更改地圖背景",
@@ -299,7 +295,6 @@
299
295
  "Restore this version": "回復此版本",
300
296
  "Save current edits": "儲存近期的變更",
301
297
  "Save map": "儲存地圖",
302
- "Save this location as new feature": "將地點存為新的圖徵",
303
298
  "Save": "儲存",
304
299
  "Saved center and zoom": "儲存地圖中心點位置與縮放大小",
305
300
  "Search location": "搜尋地點",
@@ -387,7 +382,6 @@
387
382
  "Zoom to the next": "切換至下一頁",
388
383
  "Zoom to the previous": "切換至前一頁",
389
384
  "Zoom to this feature": "縮放至圖徵範圍",
390
- "Zoom to this place": "縮放到這個地方",
391
385
  "{area} acres": "{area} 英畝",
392
386
  "{area} ha": "{area} 公頃",
393
387
  "{area} m²": "{area} 平方公尺",
@@ -526,11 +520,23 @@
526
520
  "Cannot parse remote data for layer \"{layer}\" with url \"{url}\"": "無法用網址 \"{url}\" 為圖層 \"{layer}\" 解析遠端資料",
527
521
  "Import failed: invalid data": "匯入失敗:無效的資料",
528
522
  "Anonymous": "暱名",
529
- "created at {date}": "created at {date}",
530
- "modified at {date}": "modified at {date}",
531
- "Default zoom": "Default zoom",
532
- "Default latitude": "Default latitude",
533
- "Default longitude": "Default longitude",
534
- "Edit map default view": "Edit map default view",
535
- "Use current center and zoom": "Use current center and zoom"
523
+ "created at {date}": " {date} 創建",
524
+ "modified at {date}": " {date} 變更",
525
+ "Default zoom": "預設縮放大小",
526
+ "Default latitude": "預設緯度",
527
+ "Default longitude": "預設經度",
528
+ "Edit map default view": "編輯地圖預設檢視",
529
+ "Use current center and zoom": "使用目前中心與縮放大小",
530
+ "Layer permalink": "圖層永久連結",
531
+ "Back to home": "Back to home",
532
+ "Home logo": "Home logo",
533
+ "Add this geometry to my map": "Add this geometry to my map",
534
+ "Add this place to my map": "Add this place to my map",
535
+ "Cancel last edit": "Cancel last edit",
536
+ "Redo last edit": "Redo last edit",
537
+ "Links": "Links",
538
+ "Images": "Images",
539
+ "Iframes": "Iframes",
540
+ "Tags": "Tags",
541
+ "Geocode": "Geocode"
536
542
  }
umap/static/umap/map.css CHANGED
@@ -37,7 +37,6 @@ html[dir="rtl"] .leaflet-tooltip-pane > * {
37
37
  background-color: var(--color-lightGray);
38
38
  }
39
39
 
40
-
41
40
  /* *********** */
42
41
  /* Structure */
43
42
  /* *********** */
@@ -94,6 +93,8 @@ html[dir="rtl"] .leaflet-tooltip-pane > * {
94
93
  background-image: url('./img/24.svg');
95
94
  text-indent: -9999px;
96
95
  margin-bottom: 0;
96
+ background-color: white;
97
+ min-height: initial;
97
98
  }
98
99
  .leaflet-control.display-on-more,
99
100
  .umap-control-less {
@@ -247,7 +248,19 @@ html[dir="rtl"] .leaflet-tooltip-pane > * {
247
248
  .leaflet-iconLayers:hover .leaflet-iconLayers-layerCell-plus {
248
249
  display: block;
249
250
  }
250
-
251
+ .home-button {
252
+ cursor: pointer;
253
+ line-height: 0;
254
+ border: 1px solid var(--color-darkBlue);
255
+ border-radius: 50%;
256
+ background-color: var(--background-color);
257
+ }
258
+ .home-button:hover {
259
+ background-color: var(--color-lighterGray);
260
+ }
261
+ .umap-edit-enabled .home-button {
262
+ display: none;
263
+ }
251
264
 
252
265
 
253
266
 
@@ -263,18 +276,30 @@ ul.photon-autocomplete {
263
276
  .photon-autocomplete li {
264
277
  min-height: 40px;
265
278
  line-height: 1em;
266
- padding: 5px 10px;
279
+ padding-inline-start: 10px;
267
280
  overflow: hidden;
268
281
  white-space: nowrap;
269
282
  font-size: 1em;
270
- border-inline-start: 4px solid #efefef;
283
+ border-inline-start: 4px solid var(--color-lightGray);
271
284
  }
272
285
  .photon-autocomplete li strong {
273
286
  display: block;
287
+ margin-top: 5px;
288
+ }
289
+ .photon-autocomplete button {
290
+ margin: 0;
291
+ }
292
+ .photon-autocomplete button:hover {
293
+ background-color: var(--color-darkCyan);
294
+ }
295
+ .photon-autocomplete button:hover i {
296
+ /* TODO deal with this in icon.css */
297
+ background-image: url('./img/16-white.svg');
274
298
  }
275
299
  .photon-autocomplete li.on {
276
- border-inline-start: 4px solid #2980b9;
300
+ border-inline-start: 4px solid var(--color-darkCyan);
277
301
  cursor: pointer;
302
+ background-color: var(--color-lightCyan);
278
303
  }
279
304
  .photon-autocomplete li.photon-no-result {
280
305
  text-align: center;
@@ -292,7 +317,13 @@ ul.photon-autocomplete {
292
317
  }
293
318
  .search-result-tools {
294
319
  float: inline-end;
295
- display: block;
320
+ display: none;
321
+ }
322
+ .search-result-tools button {
323
+ padding: 8px;
324
+ }
325
+ .umap-edit-enabled .photon-autocomplete li.on .search-result-tools {
326
+ display: flex;
296
327
  }
297
328
 
298
329
 
@@ -419,7 +450,7 @@ ul.photon-autocomplete {
419
450
  display: inline-block;
420
451
  width: 16px;
421
452
  height: 16px;
422
- margin-inline-start: 5px;
453
+ margin-inline-start: 2px;
423
454
  background-position: 2px -4px;
424
455
  background-repeat: no-repeat;
425
456
  background-image: url('./img/16.svg');
@@ -440,27 +471,12 @@ ul.photon-autocomplete {
440
471
  }
441
472
  .umap-getstarted button {
442
473
  width: 100%;
474
+ margin-bottom: var(--text-margin);
443
475
  }
444
476
  .umap-help {
445
477
  font-style: italic;
446
478
  }
447
479
 
448
-
449
-
450
- .umap-datalayer-version {
451
- padding: 5px 0;
452
- border-bottom: 1px solid #202425;
453
- }
454
- .umap-datalayer-version button {
455
- display: inline-block;
456
- width: 24px;
457
- min-height: 24px;
458
- background-position: -122px -73px;
459
- background-repeat: no-repeat;
460
- background-image: url('./img/16-white.svg');
461
- margin-inline-end: 10px;
462
- }
463
-
464
480
  .leaflet-toolbar-tip {
465
481
  background-color: var(--color-darkGray);
466
482
  }
@@ -646,9 +662,9 @@ a.umap-control-caption,
646
662
  .umap-caption .header i.icon {
647
663
  flex-shrink: 0;
648
664
  }
649
- .umap-caption hgroup p,
650
- .umap-caption hgroup button {
651
- margin: 0;
665
+ .umap-caption button {
666
+ background-color: var(--background-color);
667
+ color: var(--text-color);
652
668
  }
653
669
  .umap-browser .main-toolbox {
654
670
  padding-left: 4px; /* Align with toolbox below */
@@ -882,7 +898,21 @@ a.umap-control-caption,
882
898
  .umap-edit-enabled .readonly {
883
899
  cursor: not-allowed;
884
900
  }
885
-
901
+ .leaflet-container .umap-raw-icon img {
902
+ max-height: 48px !important;
903
+ max-width: 48px !important;
904
+ }
905
+ .umap-raw-icon {
906
+ display: flex;
907
+ flex-direction: column;
908
+ justify-content: center;
909
+ align-items: center;
910
+ align-content: center;
911
+ overflow: hidden;
912
+ }
913
+ .umap-raw-icon.umap-icon-active {
914
+ box-shadow: var(--block-shadow);
915
+ }
886
916
 
887
917
  /* ********************************* */
888
918
  /* Ajax loader */
@@ -976,7 +1006,7 @@ a.umap-control-caption,
976
1006
  .umap-main-edit-toolbox .umap-user span,
977
1007
  .leaflet-container .leaflet-control-edit-save span,
978
1008
  .leaflet-container .leaflet-control-edit-disable span,
979
- .leaflet-container .leaflet-control-edit-cancel span {
1009
+ .leaflet-container .edit-cancel span {
980
1010
  display: none;
981
1011
  }
982
1012
  .umap-main-edit-toolbox .umap-help-button {
@@ -49,63 +49,6 @@ describe('#dispatch', () => {
49
49
  })
50
50
  })
51
51
 
52
- describe('Updaters', () => {
53
- describe('BaseUpdater', () => {
54
- let updater
55
- let map
56
- let obj
57
-
58
- beforeEach(() => {
59
- map = {}
60
- updater = new MapUpdater(map)
61
- obj = {}
62
- })
63
- it('should be able to set object properties', () => {
64
- let obj = {}
65
- updater.updateObjectValue(obj, 'foo', 'foo')
66
- expect(obj).deep.equal({ foo: 'foo' })
67
- })
68
-
69
- it('should be able to set object properties recursively on existing objects', () => {
70
- let obj = { foo: {} }
71
- updater.updateObjectValue(obj, 'foo.bar', 'foo')
72
- expect(obj).deep.equal({ foo: { bar: 'foo' } })
73
- })
74
-
75
- it('should be able to set object properties recursively on deep objects', () => {
76
- let obj = { foo: { bar: { baz: {} } } }
77
- updater.updateObjectValue(obj, 'foo.bar.baz.test', 'value')
78
- expect(obj).deep.equal({ foo: { bar: { baz: { test: 'value' } } } })
79
- })
80
-
81
- it('should be able to replace object properties recursively on deep objects', () => {
82
- let obj = { foo: { bar: { baz: { test: 'test' } } } }
83
- updater.updateObjectValue(obj, 'foo.bar.baz.test', 'value')
84
- expect(obj).deep.equal({ foo: { bar: { baz: { test: 'value' } } } })
85
- })
86
-
87
- it('should not set object properties recursively on non-existing objects', () => {
88
- let obj = { foo: {} }
89
- updater.updateObjectValue(obj, 'bar.bar', 'value')
90
-
91
- expect(obj).deep.equal({ foo: {} })
92
- })
93
-
94
- it('should delete keys for undefined values', () => {
95
- let obj = { foo: 'foo' }
96
- updater.updateObjectValue(obj, 'foo', undefined)
97
-
98
- expect(obj).deep.equal({})
99
- })
100
-
101
- it('should delete keys for undefined values, recursively', () => {
102
- let obj = { foo: { bar: 'bar' } }
103
- updater.updateObjectValue(obj, 'foo.bar', undefined)
104
-
105
- expect(obj).deep.equal({ foo: {} })
106
- })
107
- })
108
- })
109
52
 
110
53
  describe('Operations', () => {
111
54
  describe('haveSameContext', () => {
@@ -862,4 +862,51 @@ describe('Utils', () => {
862
862
  assert.equal(Utils.isObject(''), false)
863
863
  })
864
864
  })
865
+
866
+ describe('setObjectValue', () => {
867
+ it('should be able to set object properties', () => {
868
+ let obj = {}
869
+ Utils.setObjectValue(obj, 'foo', 'foo')
870
+ expect(obj).deep.equal({ foo: 'foo' })
871
+ })
872
+
873
+ it('should be able to set object properties recursively on existing objects', () => {
874
+ let obj = { foo: {} }
875
+ Utils.setObjectValue(obj, 'foo.bar', 'foo')
876
+ expect(obj).deep.equal({ foo: { bar: 'foo' } })
877
+ })
878
+
879
+ it('should be able to set object properties recursively on deep objects', () => {
880
+ let obj = { foo: { bar: { baz: {} } } }
881
+ Utils.setObjectValue(obj, 'foo.bar.baz.test', 'value')
882
+ expect(obj).deep.equal({ foo: { bar: { baz: { test: 'value' } } } })
883
+ })
884
+
885
+ it('should be able to replace object properties recursively on deep objects', () => {
886
+ let obj = { foo: { bar: { baz: { test: 'test' } } } }
887
+ Utils.setObjectValue(obj, 'foo.bar.baz.test', 'value')
888
+ expect(obj).deep.equal({ foo: { bar: { baz: { test: 'value' } } } })
889
+ })
890
+
891
+ it('should not set object properties recursively on non-existing objects', () => {
892
+ let obj = { foo: {} }
893
+ Utils.setObjectValue(obj, 'bar.bar', 'value')
894
+
895
+ expect(obj).deep.equal({ foo: {} })
896
+ })
897
+
898
+ it('should delete keys for undefined values', () => {
899
+ let obj = { foo: 'foo' }
900
+ Utils.setObjectValue(obj, 'foo', undefined)
901
+
902
+ expect(obj).deep.equal({})
903
+ })
904
+
905
+ it('should delete keys for undefined values, recursively', () => {
906
+ let obj = { foo: { bar: 'bar' } }
907
+ Utils.setObjectValue(obj, 'foo.bar', undefined)
908
+
909
+ expect(obj).deep.equal({ foo: {} })
910
+ })
911
+ })
865
912
  })
umap/static/umap/vars.css CHANGED
@@ -1,6 +1,5 @@
1
1
  :root {
2
2
  /* Colors. */
3
- --color-waterMint: #B9F5D2;
4
3
  --color-darkBlue: #263B58;
5
4
  --color-lighterGray: #f6f6f6;
6
5
  --color-lightGray: #ddd;
@@ -12,15 +11,17 @@
12
11
  --color-limeGreen: #b9f5d2;
13
12
  --color-brightCyan: #46ece6;
14
13
  --color-lightCyan: #d4fbf9;
14
+ --color-darkCyan: #009099;
15
15
  --color-red: #c60f13;
16
16
  --color-darkRed: #5b2a2a;
17
17
 
18
18
  --background-color: var(--color-light);
19
19
  --color-accent: var(--color-brightCyan);
20
20
  --text-color: var(--color-dark);
21
+ --link-color: var(--color-darkCyan);
21
22
 
22
23
  /* Buttons. */
23
- --button-primary-background: var(--color-waterMint);
24
+ --button-primary-background: var(--color-limeGreen);
24
25
  --button-primary-color: var(--color-darkBlue);
25
26
  --button-neutral-background: var(--color-lightGray);
26
27
  --button-neutral-color: var(--color-darkGray);
@@ -43,6 +44,8 @@
43
44
  --small-box-padding: 4px;
44
45
  --box-margin: 14px;
45
46
  --text-margin: 7px;
47
+ --dialog-width: 40vw;
48
+ --map-fragment-height: 210px;
46
49
 
47
50
  /* z-indexes (leaflet CSS sets the map at 400 by default) */
48
51
  --zindex-alert: 500;