umap-project 2.5.0__py3-none-any.whl → 2.6.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 (276) hide show
  1. umap/__init__.py +1 -1
  2. umap/admin.py +6 -1
  3. umap/context_processors.py +2 -1
  4. umap/decorators.py +13 -2
  5. umap/forms.py +26 -2
  6. umap/locale/br/LC_MESSAGES/django.mo +0 -0
  7. umap/locale/br/LC_MESSAGES/django.po +252 -146
  8. umap/locale/ca/LC_MESSAGES/django.mo +0 -0
  9. umap/locale/ca/LC_MESSAGES/django.po +274 -162
  10. umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
  11. umap/locale/cs_CZ/LC_MESSAGES/django.po +261 -150
  12. umap/locale/de/LC_MESSAGES/django.mo +0 -0
  13. umap/locale/de/LC_MESSAGES/django.po +299 -187
  14. umap/locale/el/LC_MESSAGES/django.mo +0 -0
  15. umap/locale/el/LC_MESSAGES/django.po +215 -159
  16. umap/locale/en/LC_MESSAGES/django.po +211 -155
  17. umap/locale/es/LC_MESSAGES/django.mo +0 -0
  18. umap/locale/es/LC_MESSAGES/django.po +255 -144
  19. umap/locale/eu/LC_MESSAGES/django.mo +0 -0
  20. umap/locale/eu/LC_MESSAGES/django.po +254 -198
  21. umap/locale/fa_IR/LC_MESSAGES/django.mo +0 -0
  22. umap/locale/fa_IR/LC_MESSAGES/django.po +347 -235
  23. umap/locale/fr/LC_MESSAGES/django.mo +0 -0
  24. umap/locale/fr/LC_MESSAGES/django.po +216 -160
  25. umap/locale/hu/LC_MESSAGES/django.mo +0 -0
  26. umap/locale/hu/LC_MESSAGES/django.po +215 -159
  27. umap/locale/it/LC_MESSAGES/django.mo +0 -0
  28. umap/locale/it/LC_MESSAGES/django.po +252 -146
  29. umap/locale/ms/LC_MESSAGES/django.mo +0 -0
  30. umap/locale/ms/LC_MESSAGES/django.po +252 -146
  31. umap/locale/pl/LC_MESSAGES/django.mo +0 -0
  32. umap/locale/pl/LC_MESSAGES/django.po +254 -148
  33. umap/locale/pt/LC_MESSAGES/django.mo +0 -0
  34. umap/locale/pt/LC_MESSAGES/django.po +215 -159
  35. umap/locale/sv/LC_MESSAGES/django.mo +0 -0
  36. umap/locale/sv/LC_MESSAGES/django.po +254 -143
  37. umap/locale/th_TH/LC_MESSAGES/django.mo +0 -0
  38. umap/locale/th_TH/LC_MESSAGES/django.po +125 -70
  39. umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
  40. umap/locale/zh_TW/LC_MESSAGES/django.po +256 -145
  41. umap/migrations/0022_add_team.py +94 -0
  42. umap/models.py +45 -10
  43. umap/settings/__init__.py +2 -0
  44. umap/settings/base.py +9 -2
  45. umap/static/umap/base.css +32 -41
  46. umap/static/umap/content.css +19 -25
  47. umap/static/umap/css/icon.css +63 -37
  48. umap/static/umap/css/importers.css +1 -1
  49. umap/static/umap/css/slideshow.css +7 -5
  50. umap/static/umap/css/tableeditor.css +4 -3
  51. umap/static/umap/img/16-white.svg +1 -4
  52. umap/static/umap/img/16.svg +2 -6
  53. umap/static/umap/img/24-white.svg +4 -4
  54. umap/static/umap/img/24.svg +6 -6
  55. umap/static/umap/img/source/16-white.svg +2 -5
  56. umap/static/umap/img/source/16.svg +3 -7
  57. umap/static/umap/img/source/24-white.svg +7 -14
  58. umap/static/umap/img/source/24.svg +10 -17
  59. umap/static/umap/js/components/alerts/alert.css +20 -8
  60. umap/static/umap/js/modules/autocomplete.js +8 -12
  61. umap/static/umap/js/modules/browser.js +4 -3
  62. umap/static/umap/js/modules/caption.js +9 -11
  63. umap/static/umap/js/modules/data/features.js +993 -0
  64. umap/static/umap/js/modules/data/layer.js +1210 -0
  65. umap/static/umap/js/modules/formatter.js +12 -3
  66. umap/static/umap/js/modules/global.js +21 -5
  67. umap/static/umap/js/modules/importers/overpass.js +22 -8
  68. umap/static/umap/js/modules/permissions.js +280 -0
  69. umap/static/umap/js/{umap.icon.js → modules/rendering/icon.js} +77 -56
  70. umap/static/umap/js/modules/rendering/layers/base.js +105 -0
  71. umap/static/umap/js/modules/rendering/layers/classified.js +484 -0
  72. umap/static/umap/js/modules/rendering/layers/cluster.js +103 -0
  73. umap/static/umap/js/modules/rendering/layers/heat.js +182 -0
  74. umap/static/umap/js/modules/rendering/popup.js +99 -0
  75. umap/static/umap/js/modules/rendering/template.js +217 -0
  76. umap/static/umap/js/modules/rendering/ui.js +610 -0
  77. umap/static/umap/js/modules/rules.js +16 -3
  78. umap/static/umap/js/modules/schema.js +25 -1
  79. umap/static/umap/js/modules/share.js +66 -45
  80. umap/static/umap/js/modules/sync/updaters.js +9 -10
  81. umap/static/umap/js/modules/tableeditor.js +7 -7
  82. umap/static/umap/js/modules/ui/dialog.js +8 -4
  83. umap/static/umap/js/modules/utils.js +22 -13
  84. umap/static/umap/js/umap.controls.js +80 -146
  85. umap/static/umap/js/umap.core.js +9 -9
  86. umap/static/umap/js/umap.forms.js +41 -17
  87. umap/static/umap/js/umap.js +72 -65
  88. umap/static/umap/locale/am_ET.js +8 -2
  89. umap/static/umap/locale/am_ET.json +8 -2
  90. umap/static/umap/locale/ar.js +8 -2
  91. umap/static/umap/locale/ar.json +8 -2
  92. umap/static/umap/locale/ast.js +8 -2
  93. umap/static/umap/locale/ast.json +8 -2
  94. umap/static/umap/locale/bg.js +8 -2
  95. umap/static/umap/locale/bg.json +8 -2
  96. umap/static/umap/locale/br.js +42 -36
  97. umap/static/umap/locale/br.json +42 -36
  98. umap/static/umap/locale/ca.js +67 -61
  99. umap/static/umap/locale/ca.json +67 -61
  100. umap/static/umap/locale/cs_CZ.js +8 -2
  101. umap/static/umap/locale/cs_CZ.json +8 -2
  102. umap/static/umap/locale/da.js +8 -2
  103. umap/static/umap/locale/da.json +8 -2
  104. umap/static/umap/locale/de.js +143 -137
  105. umap/static/umap/locale/de.json +143 -137
  106. umap/static/umap/locale/el.js +54 -48
  107. umap/static/umap/locale/el.json +54 -48
  108. umap/static/umap/locale/en.js +10 -2
  109. umap/static/umap/locale/en.json +10 -2
  110. umap/static/umap/locale/en_US.json +8 -2
  111. umap/static/umap/locale/es.js +8 -2
  112. umap/static/umap/locale/es.json +8 -2
  113. umap/static/umap/locale/et.js +8 -2
  114. umap/static/umap/locale/et.json +8 -2
  115. umap/static/umap/locale/eu.js +346 -338
  116. umap/static/umap/locale/eu.json +346 -338
  117. umap/static/umap/locale/fa_IR.js +415 -407
  118. umap/static/umap/locale/fa_IR.json +415 -407
  119. umap/static/umap/locale/fi.js +8 -2
  120. umap/static/umap/locale/fi.json +8 -2
  121. umap/static/umap/locale/fr.js +11 -3
  122. umap/static/umap/locale/fr.json +11 -3
  123. umap/static/umap/locale/gl.js +8 -2
  124. umap/static/umap/locale/gl.json +8 -2
  125. umap/static/umap/locale/he.js +8 -2
  126. umap/static/umap/locale/he.json +8 -2
  127. umap/static/umap/locale/hr.js +8 -2
  128. umap/static/umap/locale/hr.json +8 -2
  129. umap/static/umap/locale/hu.js +31 -23
  130. umap/static/umap/locale/hu.json +31 -23
  131. umap/static/umap/locale/id.js +8 -2
  132. umap/static/umap/locale/id.json +8 -2
  133. umap/static/umap/locale/is.js +8 -2
  134. umap/static/umap/locale/is.json +8 -2
  135. umap/static/umap/locale/it.js +8 -2
  136. umap/static/umap/locale/it.json +8 -2
  137. umap/static/umap/locale/ja.js +8 -2
  138. umap/static/umap/locale/ja.json +8 -2
  139. umap/static/umap/locale/ko.js +8 -2
  140. umap/static/umap/locale/ko.json +8 -2
  141. umap/static/umap/locale/lt.js +8 -2
  142. umap/static/umap/locale/lt.json +8 -2
  143. umap/static/umap/locale/ms.js +8 -2
  144. umap/static/umap/locale/ms.json +8 -2
  145. umap/static/umap/locale/nl.js +8 -2
  146. umap/static/umap/locale/nl.json +8 -2
  147. umap/static/umap/locale/no.js +8 -2
  148. umap/static/umap/locale/no.json +8 -2
  149. umap/static/umap/locale/pl.js +54 -48
  150. umap/static/umap/locale/pl.json +54 -48
  151. umap/static/umap/locale/pl_PL.json +8 -2
  152. umap/static/umap/locale/pt.js +24 -18
  153. umap/static/umap/locale/pt.json +24 -18
  154. umap/static/umap/locale/pt_BR.js +8 -2
  155. umap/static/umap/locale/pt_BR.json +8 -2
  156. umap/static/umap/locale/pt_PT.js +214 -208
  157. umap/static/umap/locale/pt_PT.json +214 -208
  158. umap/static/umap/locale/ro.js +8 -2
  159. umap/static/umap/locale/ro.json +8 -2
  160. umap/static/umap/locale/ru.js +8 -2
  161. umap/static/umap/locale/ru.json +8 -2
  162. umap/static/umap/locale/sk_SK.js +8 -2
  163. umap/static/umap/locale/sk_SK.json +8 -2
  164. umap/static/umap/locale/sl.js +8 -2
  165. umap/static/umap/locale/sl.json +8 -2
  166. umap/static/umap/locale/sr.js +8 -2
  167. umap/static/umap/locale/sr.json +8 -2
  168. umap/static/umap/locale/sv.js +8 -2
  169. umap/static/umap/locale/sv.json +8 -2
  170. umap/static/umap/locale/th_TH.js +33 -27
  171. umap/static/umap/locale/th_TH.json +33 -27
  172. umap/static/umap/locale/tr.js +8 -2
  173. umap/static/umap/locale/tr.json +8 -2
  174. umap/static/umap/locale/uk_UA.js +8 -2
  175. umap/static/umap/locale/uk_UA.json +8 -2
  176. umap/static/umap/locale/vi.js +8 -2
  177. umap/static/umap/locale/vi.json +8 -2
  178. umap/static/umap/locale/vi_VN.json +8 -2
  179. umap/static/umap/locale/zh.js +8 -2
  180. umap/static/umap/locale/zh.json +8 -2
  181. umap/static/umap/locale/zh_CN.json +8 -2
  182. umap/static/umap/locale/zh_TW.Big5.json +8 -2
  183. umap/static/umap/locale/zh_TW.js +102 -96
  184. umap/static/umap/locale/zh_TW.json +102 -96
  185. umap/static/umap/map.css +111 -108
  186. umap/static/umap/nav.css +19 -10
  187. umap/static/umap/unittests/utils.js +230 -107
  188. umap/static/umap/vars.css +1 -0
  189. umap/static/umap/vendors/csv2geojson/csv2geojson.js +62 -40
  190. umap/static/umap/vendors/editable/Leaflet.Editable.js +2079 -1937
  191. umap/storage.py +4 -3
  192. umap/templates/404.html +5 -1
  193. umap/templates/500.html +3 -1
  194. umap/templates/auth/user_detail.html +8 -2
  195. umap/templates/auth/user_form.html +19 -10
  196. umap/templates/auth/user_stars.html +8 -2
  197. umap/templates/base.html +1 -0
  198. umap/templates/registration/login.html +18 -3
  199. umap/templates/umap/about.html +1 -0
  200. umap/templates/umap/about_summary.html +22 -7
  201. umap/templates/umap/components/alerts/alert.html +42 -21
  202. umap/templates/umap/content.html +2 -0
  203. umap/templates/umap/content_footer.html +7 -3
  204. umap/templates/umap/css.html +1 -0
  205. umap/templates/umap/dashboard_menu.html +15 -0
  206. umap/templates/umap/home.html +14 -4
  207. umap/templates/umap/js.html +4 -9
  208. umap/templates/umap/login_popup_end.html +10 -4
  209. umap/templates/umap/map_detail.html +8 -2
  210. umap/templates/umap/map_fragment.html +3 -1
  211. umap/templates/umap/map_init.html +2 -1
  212. umap/templates/umap/map_list.html +6 -3
  213. umap/templates/umap/map_table.html +36 -12
  214. umap/templates/umap/messages.html +0 -1
  215. umap/templates/umap/navigation.html +2 -1
  216. umap/templates/umap/password_change.html +5 -1
  217. umap/templates/umap/password_change_done.html +8 -2
  218. umap/templates/umap/search.html +8 -2
  219. umap/templates/umap/search_bar.html +1 -0
  220. umap/templates/umap/team_confirm_delete.html +19 -0
  221. umap/templates/umap/team_detail.html +27 -0
  222. umap/templates/umap/team_form.html +60 -0
  223. umap/templates/umap/user_dashboard.html +7 -9
  224. umap/templates/umap/user_teams.html +51 -0
  225. umap/tests/base.py +8 -1
  226. umap/tests/conftest.py +6 -0
  227. umap/tests/fixtures/test_circles_layer.geojson +219 -0
  228. umap/tests/fixtures/test_upload_georss.xml +20 -0
  229. umap/tests/integration/conftest.py +18 -4
  230. umap/tests/integration/helpers.py +12 -0
  231. umap/tests/integration/test_anonymous_owned_map.py +23 -0
  232. umap/tests/integration/test_basics.py +29 -0
  233. umap/tests/integration/test_browser.py +20 -0
  234. umap/tests/integration/test_caption.py +20 -0
  235. umap/tests/integration/test_circles_layer.py +69 -0
  236. umap/tests/integration/test_conditional_rules.py +102 -17
  237. umap/tests/integration/test_draw_polygon.py +138 -13
  238. umap/tests/integration/test_draw_polyline.py +8 -18
  239. umap/tests/integration/test_edit_datalayer.py +3 -3
  240. umap/tests/integration/test_import.py +124 -5
  241. umap/tests/integration/test_owned_map.py +21 -13
  242. umap/tests/integration/test_querystring.py +7 -0
  243. umap/tests/integration/test_team.py +47 -0
  244. umap/tests/integration/test_tilelayer.py +19 -2
  245. umap/tests/integration/test_view_marker.py +28 -1
  246. umap/tests/integration/test_websocket_sync.py +5 -5
  247. umap/tests/test_datalayer.py +32 -7
  248. umap/tests/test_datalayer_views.py +1 -1
  249. umap/tests/test_map.py +30 -4
  250. umap/tests/test_map_views.py +2 -2
  251. umap/tests/test_statics.py +40 -0
  252. umap/tests/test_team_views.py +131 -0
  253. umap/tests/test_views.py +15 -1
  254. umap/urls.py +23 -13
  255. umap/views.py +116 -10
  256. {umap_project-2.5.0.dist-info → umap_project-2.6.0.dist-info}/METADATA +14 -14
  257. {umap_project-2.5.0.dist-info → umap_project-2.6.0.dist-info}/RECORD +260 -253
  258. umap/static/umap/js/umap.datalayer.permissions.js +0 -70
  259. umap/static/umap/js/umap.features.js +0 -1290
  260. umap/static/umap/js/umap.layer.js +0 -1837
  261. umap/static/umap/js/umap.permissions.js +0 -208
  262. umap/static/umap/js/umap.popup.js +0 -341
  263. umap/static/umap/test/TableEditor.js +0 -104
  264. umap/static/umap/vendors/leaflet/leaflet-src.js +0 -14512
  265. umap/static/umap/vendors/leaflet/leaflet-src.js.map +0 -1
  266. umap/static/umap/vendors/leaflet/leaflet.js +0 -6
  267. umap/static/umap/vendors/leaflet/leaflet.js.map +0 -1
  268. umap/static/umap/vendors/markercluster/WhereAreTheJavascriptFiles.txt +0 -5
  269. umap/static/umap/vendors/markercluster/leaflet.markercluster-src.js +0 -2718
  270. umap/static/umap/vendors/markercluster/leaflet.markercluster-src.js.map +0 -1
  271. umap/static/umap/vendors/toolbar/leaflet.toolbar-src.css +0 -117
  272. umap/static/umap/vendors/toolbar/leaflet.toolbar-src.js +0 -365
  273. umap/tests/integration/test_statics.py +0 -47
  274. {umap_project-2.5.0.dist-info → umap_project-2.6.0.dist-info}/WHEEL +0 -0
  275. {umap_project-2.5.0.dist-info → umap_project-2.6.0.dist-info}/entry_points.txt +0 -0
  276. {umap_project-2.5.0.dist-info → umap_project-2.6.0.dist-info}/licenses/LICENSE +0 -0
@@ -62,8 +62,10 @@ U.Map = L.Map.extend({
62
62
  this.editPanel = new U.EditPanel(this)
63
63
  this.fullPanel = new U.FullPanel(this)
64
64
  }
65
- L.DomEvent.on(document.body, 'dataloading', (e) => this.fire('dataloading', e))
66
- L.DomEvent.on(document.body, 'dataload', (e) => this.fire('dataload', e))
65
+ if (!this.options.noControl) {
66
+ L.DomEvent.on(document.body, 'dataloading', (e) => this.fire('dataloading', e))
67
+ L.DomEvent.on(document.body, 'dataload', (e) => this.fire('dataload', e))
68
+ }
67
69
  this.server = new U.ServerRequest()
68
70
  this.request = new U.Request()
69
71
 
@@ -142,7 +144,10 @@ U.Map = L.Map.extend({
142
144
  delete this.options.displayDataBrowserOnLoad
143
145
  }
144
146
  if (this.options.datalayersControl === 'expanded') {
145
- this.options.onLoadPanel = 'datalayers'
147
+ if (!this.options.onLoadPanel) {
148
+ this.options.onLoadPanel = 'datalayers'
149
+ }
150
+ delete this.options.datalayersControl
146
151
  }
147
152
  if (this.options.onLoadPanel === 'facet') {
148
153
  this.options.onLoadPanel = 'datafilters'
@@ -193,7 +198,7 @@ U.Map = L.Map.extend({
193
198
  window.onbeforeunload = () => (this.editEnabled && this.isDirty) || null
194
199
  this.backup()
195
200
  this.initContextMenu()
196
- this.on('click contextmenu.show', this.closeInplaceToolbar)
201
+ this.on('click', this.closeInplaceToolbar)
197
202
  },
198
203
 
199
204
  initSyncEngine: async function () {
@@ -278,7 +283,9 @@ U.Map = L.Map.extend({
278
283
  // Specific case for datalayersControl
279
284
  // which accepts "expanded" value, on top of true/false/null
280
285
  if (L.Util.queryString('datalayersControl') === 'expanded') {
281
- options.onLoadPanel = 'datalayers'
286
+ if (!options.onLoadPanel) {
287
+ options.onLoadPanel = 'datalayers'
288
+ }
282
289
  }
283
290
  },
284
291
 
@@ -393,7 +400,7 @@ U.Map = L.Map.extend({
393
400
  this._controls.search = new U.SearchControl()
394
401
  this._controls.embed = new L.Control.Embed(this)
395
402
  this._controls.tilelayersChooser = new U.TileLayerChooser(this)
396
- if (this.options.user) this._controls.star = new U.StarControl(this)
403
+ if (this.options.user?.id) this._controls.star = new U.StarControl(this)
397
404
  this._controls.editinosm = new L.Control.EditInOSM({
398
405
  position: 'topleft',
399
406
  widgetOptions: {
@@ -841,11 +848,9 @@ U.Map = L.Map.extend({
841
848
  this.options.tilelayer = tilelayer.toJSON()
842
849
  this.isDirty = true
843
850
  }
844
- if (this._controls.tilelayersChooser)
845
- this._controls.tilelayersChooser.openSwitcher({
846
- callback: callback,
847
- className: 'dark',
848
- })
851
+ if (this._controls.tilelayersChooser) {
852
+ this._controls.tilelayersChooser.openSwitcher({ callback, edit: true })
853
+ }
849
854
  },
850
855
 
851
856
  toGeoJSON: function () {
@@ -863,7 +868,7 @@ U.Map = L.Map.extend({
863
868
  },
864
869
 
865
870
  eachFeature: function (callback, context) {
866
- this.eachDataLayer((datalayer) => {
871
+ this.eachBrowsableDataLayer((datalayer) => {
867
872
  if (datalayer.isVisible()) datalayer.eachFeature(callback, context)
868
873
  })
869
874
  },
@@ -1048,7 +1053,15 @@ U.Map = L.Map.extend({
1048
1053
  if (error) {
1049
1054
  return
1050
1055
  }
1051
-
1056
+ if (data.login_required) {
1057
+ window.onLogin = () => this.saveSelf()
1058
+ window.open(data.login_required)
1059
+ return
1060
+ }
1061
+ if (data.user?.id) {
1062
+ this.options.user = data.user
1063
+ this.renderEditToolbar()
1064
+ }
1052
1065
  if (!this.options.umap_id) {
1053
1066
  this.options.umap_id = data.id
1054
1067
  this.permissions.setOptions(data.permissions)
@@ -1219,46 +1232,12 @@ U.Map = L.Map.extend({
1219
1232
  _editDefaultProperties: function (container) {
1220
1233
  const optionsFields = [
1221
1234
  'options.zoomTo',
1222
- ['options.easing', { handler: 'Switch', label: L._('Animated transitions') }],
1235
+ 'options.easing',
1223
1236
  'options.labelKey',
1224
- [
1225
- 'options.sortKey',
1226
- {
1227
- handler: 'BlurInput',
1228
- helpEntries: 'sortKey',
1229
- placeholder: L._('Default: name'),
1230
- label: L._('Sort key'),
1231
- inheritable: true,
1232
- },
1233
- ],
1234
- [
1235
- 'options.filterKey',
1236
- {
1237
- handler: 'Input',
1238
- helpEntries: 'filterKey',
1239
- placeholder: L._('Default: name'),
1240
- label: L._('Search keys'),
1241
- inheritable: true,
1242
- },
1243
- ],
1244
- [
1245
- 'options.facetKey',
1246
- {
1247
- handler: 'BlurInput',
1248
- helpEntries: 'facetKey',
1249
- placeholder: L._('Example: key1,key2|Label 2,key3|Label 3|checkbox'),
1250
- label: L._('Filters keys'),
1251
- },
1252
- ],
1253
- [
1254
- 'options.slugKey',
1255
- {
1256
- handler: 'BlurInput',
1257
- helpEntries: 'slugKey',
1258
- placeholder: L._('Default: name'),
1259
- label: L._('Feature identifier key'),
1260
- },
1261
- ],
1237
+ 'options.sortKey',
1238
+ 'options.filterKey',
1239
+ 'options.facetKey',
1240
+ 'options.slugKey',
1262
1241
  ]
1263
1242
 
1264
1243
  builder = new U.FormBuilder(this, optionsFields)
@@ -1485,13 +1464,13 @@ U.Map = L.Map.extend({
1485
1464
  const advancedActions = L.DomUtil.createFieldset(container, L._('Advanced actions'))
1486
1465
  const advancedButtons = L.DomUtil.create('div', 'button-bar half', advancedActions)
1487
1466
  if (this.permissions.isOwner()) {
1488
- L.DomUtil.createButton(
1489
- 'button umap-delete',
1490
- advancedButtons,
1491
- L._('Delete'),
1492
- this.del,
1493
- this
1494
- )
1467
+ const deleteButton = U.Utils.loadTemplate(`
1468
+ <button class="button" type="button">
1469
+ <i class="icon icon-24 icon-delete"></i>${L._('Delete')}
1470
+ </button>`)
1471
+ deleteButton.addEventListener('click', () => this.del())
1472
+ advancedButtons.appendChild(deleteButton)
1473
+
1495
1474
  L.DomUtil.createButton(
1496
1475
  'button umap-empty',
1497
1476
  advancedButtons,
@@ -1589,6 +1568,7 @@ U.Map = L.Map.extend({
1589
1568
  this.editPanel.close()
1590
1569
  this.fullPanel.close()
1591
1570
  this.sync.stop()
1571
+ this.closeInplaceToolbar()
1592
1572
  },
1593
1573
 
1594
1574
  hasEditMode: function () {
@@ -1607,7 +1587,7 @@ U.Map = L.Map.extend({
1607
1587
  )
1608
1588
  const name = L.DomUtil.create('h3', '', container)
1609
1589
  L.DomEvent.disableClickPropagation(container)
1610
- this.permissions.addOwnerLink('span', container)
1590
+ this.addAuthorLink('span', container)
1611
1591
  if (this.getOption('captionMenus')) {
1612
1592
  L.DomUtil.createButton(
1613
1593
  'umap-about-link flat',
@@ -1663,11 +1643,13 @@ U.Map = L.Map.extend({
1663
1643
  },
1664
1644
 
1665
1645
  del: async function () {
1666
- if (confirm(L._('Are you sure you want to delete this map?'))) {
1667
- const url = this.urls.get('map_delete', { map_id: this.options.umap_id })
1668
- const [data, response, error] = await this.server.post(url)
1669
- if (data.redirect) window.location = data.redirect
1670
- }
1646
+ this.dialog
1647
+ .confirm(L._('Are you sure you want to delete this map?'))
1648
+ .then(async () => {
1649
+ const url = this.urls.get('map_delete', { map_id: this.options.umap_id })
1650
+ const [data, response, error] = await this.server.post(url)
1651
+ if (data.redirect) window.location = data.redirect
1652
+ })
1671
1653
  },
1672
1654
 
1673
1655
  clone: async function () {
@@ -1866,6 +1848,14 @@ U.Map = L.Map.extend({
1866
1848
  return url
1867
1849
  },
1868
1850
 
1851
+ getFeatureById: function (id) {
1852
+ let feature
1853
+ for (const datalayer of Object.values(this.datalayers)) {
1854
+ feature = datalayer.getFeatureById(id)
1855
+ if (feature) return feature
1856
+ }
1857
+ },
1858
+
1869
1859
  closeInplaceToolbar: function () {
1870
1860
  const toolbar = this._toolbars[L.Toolbar.Popup._toolbar_class_id]
1871
1861
  if (toolbar) toolbar.remove()
@@ -1902,4 +1892,21 @@ U.Map = L.Map.extend({
1902
1892
  .filter((val, idx, arr) => arr.indexOf(val) === idx)
1903
1893
  .sort(U.Utils.naturalSort)
1904
1894
  },
1895
+
1896
+ addAuthorLink: function (element, container) {
1897
+ if (this.options.author?.name) {
1898
+ const authorContainer = L.DomUtil.add(
1899
+ element,
1900
+ 'umap-map-author',
1901
+ container,
1902
+ ` ${L._('by')} `
1903
+ )
1904
+ L.DomUtil.createLink(
1905
+ '',
1906
+ authorContainer,
1907
+ this.options.author.name,
1908
+ this.options.author.url
1909
+ )
1910
+ }
1911
+ },
1905
1912
  })
@@ -115,7 +115,6 @@ 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",
119
118
  "Display the embed control": "Display the embed control",
120
119
  "Display the fullscreen control": "Display the fullscreen control",
121
120
  "Display the locate control": "Display the locate control",
@@ -498,7 +497,14 @@ const locale = {
498
497
  "Found {count} rows. Are you sure you want to delete all?": "Found {count} rows. Are you sure you want to delete all?",
499
498
  "Expression is empty": "Expression is empty",
500
499
  "OK": "OK",
501
- "Cancel": "Cancel"
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"
502
508
  }
503
509
  L.registerLocale("am_ET", locale)
504
510
  L.setLocale("am_ET")
@@ -115,7 +115,6 @@
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",
119
118
  "Display the embed control": "Display the embed control",
120
119
  "Display the fullscreen control": "Display the fullscreen control",
121
120
  "Display the locate control": "Display the locate control",
@@ -498,5 +497,12 @@
498
497
  "Found {count} rows. Are you sure you want to delete all?": "Found {count} rows. Are you sure you want to delete all?",
499
498
  "Expression is empty": "Expression is empty",
500
499
  "OK": "OK",
501
- "Cancel": "Cancel"
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"
502
508
  }
@@ -115,7 +115,6 @@ const locale = {
115
115
  "display name": "display name",
116
116
  "Display on load": "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",
119
118
  "Display the embed control": "Display the embed control",
120
119
  "Display the fullscreen control": "Display the fullscreen control",
121
120
  "Display the locate control": "Display the locate control",
@@ -498,7 +497,14 @@ const locale = {
498
497
  "Found {count} rows. Are you sure you want to delete all?": "Found {count} rows. Are you sure you want to delete all?",
499
498
  "Expression is empty": "Expression is empty",
500
499
  "OK": "OK",
501
- "Cancel": "Cancel"
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"
502
508
  }
503
509
  L.registerLocale("ar", locale)
504
510
  L.setLocale("ar")
@@ -115,7 +115,6 @@
115
115
  "display name": "display name",
116
116
  "Display on load": "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",
119
118
  "Display the embed control": "Display the embed control",
120
119
  "Display the fullscreen control": "Display the fullscreen control",
121
120
  "Display the locate control": "Display the locate control",
@@ -498,5 +497,12 @@
498
497
  "Found {count} rows. Are you sure you want to delete all?": "Found {count} rows. Are you sure you want to delete all?",
499
498
  "Expression is empty": "Expression is empty",
500
499
  "OK": "OK",
501
- "Cancel": "Cancel"
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"
502
508
  }
@@ -115,7 +115,6 @@ const locale = {
115
115
  "display name": "display name",
116
116
  "Display on load": "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",
119
118
  "Display the embed control": "Display the embed control",
120
119
  "Display the fullscreen control": "Display the fullscreen control",
121
120
  "Display the locate control": "Display the locate control",
@@ -498,7 +497,14 @@ const locale = {
498
497
  "Found {count} rows. Are you sure you want to delete all?": "Found {count} rows. Are you sure you want to delete all?",
499
498
  "Expression is empty": "Expression is empty",
500
499
  "OK": "OK",
501
- "Cancel": "Cancel"
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"
502
508
  }
503
509
  L.registerLocale("ast", locale)
504
510
  L.setLocale("ast")
@@ -115,7 +115,6 @@
115
115
  "display name": "display name",
116
116
  "Display on load": "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",
119
118
  "Display the embed control": "Display the embed control",
120
119
  "Display the fullscreen control": "Display the fullscreen control",
121
120
  "Display the locate control": "Display the locate control",
@@ -498,5 +497,12 @@
498
497
  "Found {count} rows. Are you sure you want to delete all?": "Found {count} rows. Are you sure you want to delete all?",
499
498
  "Expression is empty": "Expression is empty",
500
499
  "OK": "OK",
501
- "Cancel": "Cancel"
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"
502
508
  }
@@ -115,7 +115,6 @@ 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",
119
118
  "Display the embed control": "Display the embed control",
120
119
  "Display the fullscreen control": "Показване управлението за цял екран",
121
120
  "Display the locate control": "Display the locate control",
@@ -498,7 +497,14 @@ const locale = {
498
497
  "Found {count} rows. Are you sure you want to delete all?": "Found {count} rows. Are you sure you want to delete all?",
499
498
  "Expression is empty": "Expression is empty",
500
499
  "OK": "OK",
501
- "Cancel": "Cancel"
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"
502
508
  }
503
509
  L.registerLocale("bg", locale)
504
510
  L.setLocale("bg")
@@ -115,7 +115,6 @@
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",
119
118
  "Display the embed control": "Display the embed control",
120
119
  "Display the fullscreen control": "Показване управлението за цял екран",
121
120
  "Display the locate control": "Display the locate control",
@@ -498,5 +497,12 @@
498
497
  "Found {count} rows. Are you sure you want to delete all?": "Found {count} rows. Are you sure you want to delete all?",
499
498
  "Expression is empty": "Expression is empty",
500
499
  "OK": "OK",
501
- "Cancel": "Cancel"
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"
502
508
  }
@@ -115,7 +115,6 @@ const locale = {
115
115
  "display name": "anv diskwel",
116
116
  "Display on load": "Diskwel en ur gargañ",
117
117
  "Display the control to open OpenStreetMap editor": "Diskwel an afell evit digeriñ an aozer OpenStreetMap",
118
- "Display the data layers control": "Diskwel panell ar gwiskadoù roadennoù",
119
118
  "Display the embed control": "Diskwel an afell \"enframmañ\"",
120
119
  "Display the fullscreen control": "Diskwel an afell \"skramm a-bezh\"",
121
120
  "Display the locate control": "Diskwel an afell \"lec'hiañ\"",
@@ -426,15 +425,15 @@ const locale = {
426
425
  "Filters keys": "Filters keys",
427
426
  "Filter data": "Roadennoù ar sil",
428
427
  "Search map features…": "Klask perzhioù ar gartenn..",
429
- "Reset all": "Reset all",
430
- "Open browser": "Open browser",
428
+ "Reset all": "Adlakaat pep tra",
429
+ "Open browser": "Digeriñ ar merdeer",
431
430
  "Open caption": "Open caption",
432
431
  "Your map has been created with an anonymous account!": "Your map has been created with an anonymous account!",
433
432
  "Real-time collaboration": "Real-time collaboration",
434
- "Cannot parse data": "Cannot parse data",
435
- "Start typing...": "Start typing...",
436
- "No result": "No result",
437
- "Data browser": "Data browser",
433
+ "Cannot parse data": "N'haller ket dielfennañ ar roadennoù",
434
+ "Start typing...": "Krogit da skrivañ...",
435
+ "No result": "Disoc'h ebet",
436
+ "Data browser": "Furchal ar roadennoù",
438
437
  "When providing an URL, uMap can copy the remote data in a layer, or add this URL as remote source of the layer. In that case, data will always be fetched from that URL, and thus be up to date, but it will not be possible to edit it inside uMap.": "When providing an URL, uMap can copy the remote data in a layer, or add this URL as remote source of the layer. In that case, data will always be fetched from that URL, and thus be up to date, but it will not be possible to edit it inside uMap.",
439
438
  "Overpass supported expressions": "Overpass supported expressions",
440
439
  "key (eg. building)": "key (eg. building)",
@@ -445,25 +444,25 @@ const locale = {
445
444
  "key=\"value|value2\" (eg. name=\"Paris|Berlin\")": "key=\"value|value2\" (eg. name=\"Paris|Berlin\")",
446
445
  "More info about Overpass syntax": "More info about Overpass syntax",
447
446
  "For more complex needs, see": "For more complex needs, see",
448
- "Choose data": "Choose data",
447
+ "Choose data": "Dibab ar roadennoù",
449
448
  "Import helpers:": "Import helpers:",
450
- "Choose the format": "Choose the format",
451
- "Choose the layer": "Choose the layer",
452
- "Layer name": "Layer name",
449
+ "Choose the format": "Dibab ar furmad",
450
+ "Choose the layer": "Dibab ar gwiskad",
451
+ "Layer name": "Anv ar gwiskad",
453
452
  "Choose import mode": "Choose import mode",
454
- "Copy into the layer": "Copy into the layer",
453
+ "Copy into the layer": "Eilañ e-barzh ar gwiskad",
455
454
  "Link to the layer as remote data": "Link to the layer as remote data",
456
455
  "Condition": "Condition",
457
- "key=value or key!=value": "key=value or key!=value",
458
- "Are you sure you want to delete this rule?": "Are you sure you want to delete this rule?",
459
- "empty rule": "empty rule",
456
+ "key=value or key!=value": "key=value pe key!=value",
457
+ "Are you sure you want to delete this rule?": "Ha sur oc'h e faot deoc'h dilemel ar reolenn-mañ?",
458
+ "empty rule": "Reolenn goullo",
460
459
  "Conditional style rules": "Conditional style rules",
461
- "Add rule": "Add rule",
462
- "Browser: data": "Browser: data",
463
- "Browser: layers": "Browser: layers",
464
- "Browser: filters": "Browser: filters",
460
+ "Add rule": "Ouzhpennañ ur reolenn",
461
+ "Browser: data": "Merdeer: roadennoù",
462
+ "Browser: layers": "Merdeer: gwiskadoù",
463
+ "Browser: filters": "Merdeer: siloù",
465
464
  "Enable real-time collaboration": "Enable real-time collaboration",
466
- "✅ Copied!": "✅ Copied!",
465
+ "✅ Copied!": "✅ Eilet !",
467
466
  "Choose a dataset": "Choose a dataset",
468
467
  "Choose this dataset": "Choose this dataset",
469
468
  "GeoDataMine: thematic data from OpenStreetMap": "GeoDataMine: thematic data from OpenStreetMap",
@@ -473,32 +472,39 @@ const locale = {
473
472
  "Search admin boundary": "Search admin boundary",
474
473
  "Please choose a theme and a boundary first.": "Please choose a theme and a boundary first.",
475
474
  "Expression": "Expression",
476
- "Geometry mode": "Geometry mode",
475
+ "Geometry mode": "Mod mentoniezh",
477
476
  "Only geometry centers": "Only geometry centers",
478
477
  "Search area": "Search area",
479
478
  "Type area name, or let empty to load data in current map view": "Type area name, or let empty to load data in current map view",
480
- "Data successfully imported!": "Data successfully imported!",
481
- "My Dashboard ({username})": "My Dashboard ({username})",
482
- "Clear data": "Clear data",
483
- "Remove layers": "Remove layers",
484
- "Categorized": "Categorized",
485
- "Alphabetical": "Alphabetical",
486
- "Category property": "Category property",
479
+ "Data successfully imported!": "Roadennoù enporzhiet gant berzh!",
480
+ "My Dashboard ({username})": "Ma Zaolenn-vourzh ({username})",
481
+ "Clear data": "Skarzhañ ar roadennoù",
482
+ "Remove layers": "Lemel ar gwiskadoù",
483
+ "Categorized": "Dre rummad",
484
+ "Alphabetical": "Urzh al lizherenneg",
485
+ "Category property": "Perzh",
487
486
  "Color palette": "Color palette",
488
- "Categories": "Categories",
487
+ "Categories": "Rummadoù",
489
488
  "Comma separated list of categories.": "Comma separated list of categories.",
490
489
  "Categories mode": "Categories mode",
491
490
  "Remove filter for this column": "Remove filter for this column",
492
491
  "Add filter for this column": "Add filter for this column",
493
- "Rename this column": "Rename this column",
494
- "Delete this column": "Delete this column",
495
- "Name “{name}” should not contain a dot.": "Name “{name}” should not contain a dot.",
496
- "This name already exists: “{name}”": "This name already exists: “{name}”",
497
- "Delete selected rows": "Delete selected rows",
492
+ "Rename this column": "Adenvel ar bann-mañ",
493
+ "Delete this column": "Dilemel ar bann-mañ",
494
+ "Name “{name}” should not contain a dot.": "Ne rankfe ket bout ur pik e-barzh an anv “{name}”.",
495
+ "This name already exists: “{name}”": "Bout 'zo an anv-se dija: “{name}”",
496
+ "Delete selected rows": "Dilemel al linennoù diuzet",
498
497
  "Found {count} rows. Are you sure you want to delete all?": "Found {count} rows. Are you sure you want to delete all?",
499
498
  "Expression is empty": "Expression is empty",
500
- "OK": "OK",
501
- "Cancel": "Cancel"
499
+ "OK": "Mat eo",
500
+ "Cancel": "Nullañ",
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"
502
508
  }
503
509
  L.registerLocale("br", locale)
504
510
  L.setLocale("br")