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
@@ -38,7 +38,7 @@ DATALAYER_DATA = {
38
38
  "_umap_options": {
39
39
  "color": "OliveDrab",
40
40
  },
41
- "name": "test",
41
+ "name": "test one",
42
42
  "description": "Some description",
43
43
  },
44
44
  "id": "QwNjg",
@@ -54,7 +54,7 @@ DATALAYER_DATA = {
54
54
  "fill": False,
55
55
  "opacity": 0.6,
56
56
  },
57
- "name": "test",
57
+ "name": "test two",
58
58
  },
59
59
  "id": "YwMTM",
60
60
  "geometry": {
@@ -143,7 +143,7 @@ def test_umap_export(map, live_server, bootstrap, page):
143
143
  "id": "QwNjg",
144
144
  "properties": {
145
145
  "_umap_options": {"color": "OliveDrab"},
146
- "name": "test",
146
+ "name": "test one",
147
147
  "description": "Some description",
148
148
  },
149
149
  "type": "Feature",
@@ -164,7 +164,7 @@ def test_umap_export(map, live_server, bootstrap, page):
164
164
  "id": "YwMTM",
165
165
  "properties": {
166
166
  "_umap_options": {"fill": False, "opacity": 0.6},
167
- "name": "test",
167
+ "name": "test two",
168
168
  },
169
169
  "type": "Feature",
170
170
  },
@@ -210,8 +210,8 @@ def test_csv_export(map, live_server, bootstrap, page):
210
210
  path.read_text()
211
211
  == """name,Latitude,Longitude,description
212
212
  name poly,53.0072070131872,12.182431646910137,
213
- test,52.57635,-0.274658,Some description
214
- test,53.725145179688646,2.9700064980570517,"""
213
+ test one,52.57635,-0.274658,Some description
214
+ test two,53.725145179688646,2.9700064980570517,"""
215
215
  )
216
216
 
217
217
 
@@ -228,7 +228,7 @@ def test_gpx_export(map, live_server, bootstrap, page):
228
228
  download.save_as(path)
229
229
  assert (
230
230
  path.read_text()
231
- == """<?xml version="1.0" encoding="UTF-8"?><gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1" creator="@dwayneparton/geojson-to-gpx"><wpt lat="52.57635" lon="-0.274658"><name>test</name><desc>Some description</desc></wpt><trk><name>test</name><trkseg><trkpt lat="54.476422" lon="-0.571289"/><trkpt lat="54.610255" lon="0.439453"/><trkpt lat="53.448807" lon="1.724854"/><trkpt lat="53.988395" lon="4.163818"/><trkpt lat="53.533778" lon="5.306396"/><trkpt lat="53.709714" lon="6.591797"/><trkpt lat="53.350551" lon="7.042236"/></trkseg></trk></gpx>"""
231
+ == """<?xml version="1.0" encoding="UTF-8"?><gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1" creator="@dwayneparton/geojson-to-gpx"><wpt lat="52.57635" lon="-0.274658"><name>test one</name><desc>Some description</desc></wpt><trk><name>test two</name><trkseg><trkpt lat="54.476422" lon="-0.571289"/><trkpt lat="54.610255" lon="0.439453"/><trkpt lat="53.448807" lon="1.724854"/><trkpt lat="53.988395" lon="4.163818"/><trkpt lat="53.533778" lon="5.306396"/><trkpt lat="53.709714" lon="6.591797"/><trkpt lat="53.350551" lon="7.042236"/></trkseg></trk></gpx>"""
232
232
  )
233
233
 
234
234
 
@@ -244,7 +244,7 @@ def test_kml_export(map, live_server, bootstrap, page):
244
244
  download.save_as(path)
245
245
  assert (
246
246
  path.read_text()
247
- == """<kml xmlns="http://www.opengis.net/kml/2.2"><Document>\n<Placemark id="gyNzM">\n<name>name poly</name><ExtendedData></ExtendedData>\n <Polygon>\n<outerBoundaryIs>\n <LinearRing><coordinates>11.25,53.585984\n10.151367,52.975108\n12.689209,52.167194\n14.084473,53.199452\n12.634277,53.618579\n11.25,53.585984\n11.25,53.585984</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark>\n<Placemark id="QwNjg">\n<name>test</name><description>Some description</description><ExtendedData>\n <Data name="_umap_options"><value>{"color":"OliveDrab"}</value></Data></ExtendedData>\n <Point><coordinates>-0.274658,52.57635</coordinates></Point></Placemark>\n<Placemark id="YwMTM">\n<name>test</name><ExtendedData>\n <Data name="_umap_options"><value>{"fill":false,"opacity":0.6}</value></Data></ExtendedData>\n <LineString><coordinates>-0.571289,54.476422\n0.439453,54.610255\n1.724854,53.448807\n4.163818,53.988395\n5.306396,53.533778\n6.591797,53.709714\n7.042236,53.350551</coordinates></LineString></Placemark></Document></kml>"""
247
+ == """<kml xmlns="http://www.opengis.net/kml/2.2"><Document>\n<Placemark id="gyNzM">\n<name>name poly</name><ExtendedData></ExtendedData>\n <Polygon>\n<outerBoundaryIs>\n <LinearRing><coordinates>11.25,53.585984\n10.151367,52.975108\n12.689209,52.167194\n14.084473,53.199452\n12.634277,53.618579\n11.25,53.585984\n11.25,53.585984</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark>\n<Placemark id="QwNjg">\n<name>test one</name><description>Some description</description><ExtendedData>\n <Data name="_umap_options"><value>{"color":"OliveDrab"}</value></Data></ExtendedData>\n <Point><coordinates>-0.274658,52.57635</coordinates></Point></Placemark>\n<Placemark id="YwMTM">\n<name>test two</name><ExtendedData>\n <Data name="_umap_options"><value>{"fill":false,"opacity":0.6}</value></Data></ExtendedData>\n <LineString><coordinates>-0.571289,54.476422\n0.439453,54.610255\n1.724854,53.448807\n4.163818,53.988395\n5.306396,53.533778\n6.591797,53.709714\n7.042236,53.350551</coordinates></LineString></Placemark></Document></kml>"""
248
248
  )
249
249
 
250
250
 
@@ -284,7 +284,7 @@ def test_geojson_export(map, live_server, bootstrap, page):
284
284
  "id": "QwNjg",
285
285
  "properties": {
286
286
  "_umap_options": {"color": "OliveDrab"},
287
- "name": "test",
287
+ "name": "test one",
288
288
  "description": "Some description",
289
289
  },
290
290
  "type": "Feature",
@@ -305,10 +305,74 @@ def test_geojson_export(map, live_server, bootstrap, page):
305
305
  "id": "YwMTM",
306
306
  "properties": {
307
307
  "_umap_options": {"fill": False, "opacity": 0.6},
308
- "name": "test",
308
+ "name": "test two",
309
309
  },
310
310
  "type": "Feature",
311
311
  },
312
312
  ],
313
313
  "type": "FeatureCollection",
314
314
  }
315
+
316
+
317
+ def test_export_should_respect_filters(map, live_server, bootstrap, page):
318
+ page.goto(f"{live_server.url}{map.get_absolute_url()}")
319
+ page.locator("summary").filter(has_text="Filters").locator("i").click()
320
+ page.get_by_role("textbox", name="Search map features…").fill("test")
321
+ page.wait_for_timeout(300) # Wait for debounce
322
+ page.get_by_role("button", name="Share and download").click()
323
+ button = page.get_by_role("button", name="geojson")
324
+ expect(button).to_be_visible()
325
+ with page.expect_download() as download_info:
326
+ button.click()
327
+ download = download_info.value
328
+ assert download.suggested_filename == "test_map.geojson"
329
+ path = Path("/tmp/") / download.suggested_filename
330
+ download.save_as(path)
331
+ assert json.loads(path.read_text()) == {
332
+ "features": [
333
+ {
334
+ "geometry": {"coordinates": [-0.274658, 52.57635], "type": "Point"},
335
+ "id": "QwNjg",
336
+ "properties": {
337
+ "_umap_options": {"color": "OliveDrab"},
338
+ "name": "test one",
339
+ "description": "Some description",
340
+ },
341
+ "type": "Feature",
342
+ },
343
+ {
344
+ "geometry": {
345
+ "coordinates": [
346
+ [-0.571289, 54.476422],
347
+ [0.439453, 54.610255],
348
+ [1.724854, 53.448807],
349
+ [4.163818, 53.988395],
350
+ [5.306396, 53.533778],
351
+ [6.591797, 53.709714],
352
+ [7.042236, 53.350551],
353
+ ],
354
+ "type": "LineString",
355
+ },
356
+ "id": "YwMTM",
357
+ "properties": {
358
+ "_umap_options": {"fill": False, "opacity": 0.6},
359
+ "name": "test two",
360
+ },
361
+ "type": "Feature",
362
+ },
363
+ ],
364
+ "type": "FeatureCollection",
365
+ }
366
+
367
+
368
+ def test_png_export(map, live_server, bootstrap, page):
369
+ page.goto(f"{live_server.url}{map.get_absolute_url()}?share#6/53.406/6.757")
370
+ page.get_by_role("button", name="png").click()
371
+ with page.expect_download() as download_info:
372
+ page.get_by_role("button", name="Download", exact=True).click()
373
+ download = download_info.value
374
+ assert download.suggested_filename == "test_map.png"
375
+ path = Path("/tmp/") / download.suggested_filename
376
+ download.save_as(path)
377
+ # Something has been saved…
378
+ assert path.read_bytes()
@@ -104,7 +104,7 @@ def test_map_preview_can_load_csv_in_querystring(page, live_server, tilelayer):
104
104
 
105
105
  def test_map_preview_can_change_styling_from_querystring(page, live_server, tilelayer):
106
106
  page.goto(f"{live_server.url}/map/?data={quote(json.dumps(GEOJSON))}&color=DarkRed")
107
- markers = page.locator(".leaflet-marker-icon .icon_container")
107
+ markers = page.locator(".leaflet-marker-icon .icon-container")
108
108
  expect(markers).to_have_count(1)
109
109
  expect(markers).to_have_css("background-color", "rgb(139, 0, 0)")
110
110
 
@@ -27,7 +27,7 @@ def test_iframe_code_can_contain_datalayers(map, live_server, datalayer, page):
27
27
 
28
28
  def test_iframe_code_can_contain_feature(map, live_server, datalayer, page):
29
29
  page.goto(f"{live_server.url}{map.get_absolute_url()}?share")
30
- page.locator(".icon_container").click()
30
+ page.locator(".icon-container").click()
31
31
  textarea = page.locator(".umap-share-iframe")
32
32
  expect(textarea).to_be_visible()
33
33
  expect(textarea).not_to_have_text(re.compile("feature=Here"))
@@ -130,13 +130,13 @@ def test_rename_property(live_server, openmap, page):
130
130
  expect(page.locator("table th button[data-property=mytype]")).to_have_count(0)
131
131
 
132
132
  page.locator(".panel.full").get_by_role("button", name="Close").click()
133
- page.locator(".leaflet-marker-icon").first.click()
133
+ page.locator(".leaflet-marker-icon").first.click(button="right")
134
134
  page.get_by_role("button", name="Toggle edit mode (⇧+Click)").click()
135
135
  expect(page.locator(".panel.right .umap-field-mynewtype")).to_be_visible()
136
136
  expect(page.locator(".panel.right .umap-field-mytype")).to_be_hidden()
137
137
  page.locator(".edit-undo").click()
138
138
  page.locator(".panel.right").get_by_role("button", name="Close").click()
139
- page.locator(".leaflet-marker-icon").first.click()
139
+ page.locator(".leaflet-marker-icon").first.click(button="right")
140
140
  page.get_by_role("button", name="Toggle edit mode (⇧+Click)").click()
141
141
  expect(page.locator(".panel.right .umap-field-mynewtype")).to_be_hidden()
142
142
  expect(page.locator(".panel.right .umap-field-mytype")).to_be_visible()
@@ -154,12 +154,12 @@ def test_delete_property(live_server, openmap, page):
154
154
  expect(page.locator("table th button[data-property=mytype]")).to_have_count(0)
155
155
 
156
156
  page.locator(".panel.full").get_by_role("button", name="Close").click()
157
- page.locator(".leaflet-marker-icon").first.click()
157
+ page.locator(".leaflet-marker-icon").first.click(button="right")
158
158
  page.get_by_role("button", name="Toggle edit mode (⇧+Click)").click()
159
159
  expect(page.locator(".panel.right .umap-field-mytype")).to_be_hidden()
160
160
  page.locator(".edit-undo").click()
161
161
  page.locator(".panel.right").get_by_role("button", name="Close").click()
162
- page.locator(".leaflet-marker-icon").first.click()
162
+ page.locator(".leaflet-marker-icon").first.click(button="right")
163
163
  page.get_by_role("button", name="Toggle edit mode (⇧+Click)").click()
164
164
  expect(page.locator(".panel.right .umap-field-mytype")).to_be_visible()
165
165
 
@@ -58,7 +58,7 @@ def test_websocket_connection_can_sync_markers(new_page, asgi_live_server, tilel
58
58
  peerA.locator("body").press("Escape")
59
59
  peerA.wait_for_timeout(300)
60
60
 
61
- peerB.locator(".leaflet-marker-icon").first.click()
61
+ peerB.locator(".leaflet-marker-icon").first.click(button="right")
62
62
  peerB.get_by_role("button", name="Toggle edit mode (⇧+Click)").click()
63
63
  expect(peerB.locator('input[name="name"]')).to_have_value("Synced name")
64
64
 
@@ -137,7 +137,7 @@ def test_websocket_connection_can_sync_polygons(context, asgi_live_server, tilel
137
137
  a_polygon_bbox_t1 = a_polygon.bounding_box()
138
138
  assert b_polygon_bbox_t1 == a_polygon_bbox_t1
139
139
 
140
- b_polygon.click()
140
+ b_polygon.click(button="right")
141
141
  peerB.get_by_role("button", name="Toggle edit mode (⇧+Click)").click()
142
142
 
143
143
  edited_vertex = peerB.locator("div:nth-child(6)").first
@@ -151,7 +151,7 @@ def test_websocket_connection_can_sync_polygons(context, asgi_live_server, tilel
151
151
  assert b_polygon_bbox_t2 == a_polygon_bbox_t2
152
152
 
153
153
  # Move the polygon on peer B and check it moved also on peer A
154
- b_polygon.click()
154
+ b_polygon.click(button="right")
155
155
  peerB.get_by_role("button", name="Toggle edit mode (⇧+Click)").click()
156
156
 
157
157
  b_polygon.drag_to(b_map_el, target_position={"x": 400, "y": 400})
@@ -340,7 +340,7 @@ def test_websocket_connection_can_sync_late_joining_peer(
340
340
  expect(b_polygons).to_have_count(1)
341
341
 
342
342
  # Verify marker properties
343
- peerB.locator(".leaflet-marker-icon").first.click()
343
+ peerB.locator(".leaflet-marker-icon").first.click(button="right")
344
344
  peerB.get_by_role("button", name="Toggle edit mode (⇧+Click)").click()
345
345
  expect(peerB.locator('input[name="name"]')).to_have_value("First marker")
346
346
 
umap/utils.py CHANGED
@@ -196,7 +196,11 @@ def collect_pictograms():
196
196
  root = Path(definition["path"])
197
197
  subfolder = "pictograms"
198
198
  if not root.is_absolute():
199
- root = Path(finders.find(root).removesuffix(definition["path"]))
199
+ found_path = finders.find(root)
200
+ if not found_path:
201
+ print(f"Cannot find {root} in STATIFILES_DIRS")
202
+ continue
203
+ root = Path(found_path.removesuffix(definition["path"].rstrip("/")))
200
204
  subfolder = definition["path"]
201
205
  categories = {}
202
206
  for path in (root / subfolder).iterdir():
umap/views.py CHANGED
@@ -636,6 +636,8 @@ class MapDetailMixin(SessionMixin):
636
636
  "defaultLabelKeys": settings.UMAP_LABEL_KEYS,
637
637
  "help_links": settings.UMAP_HELP_LINKS,
638
638
  }
639
+ if settings.OPENROUTESERVICE_APIKEY:
640
+ properties["ORSAPIKey"] = settings.OPENROUTESERVICE_APIKEY
639
641
  created = bool(getattr(self, "object", None))
640
642
  if created:
641
643
  properties.update(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: umap-project
3
- Version: 3.2.0
3
+ Version: 3.3.0
4
4
  Summary: Create maps with OpenStreetMap layers in a minute and embed them in your site.
5
5
  Author-email: Yohan Boniface <yb@enix.org>
6
6
  Maintainer-email: David Larlet <david@larlet.fr>
@@ -19,7 +19,7 @@ Requires-Python: >=3.10
19
19
  Requires-Dist: django-agnocomplete==2.2.0
20
20
  Requires-Dist: django-environ==0.12.0
21
21
  Requires-Dist: django-probes==1.7.0
22
- Requires-Dist: django==5.2.4
22
+ Requires-Dist: django==5.2.5
23
23
  Requires-Dist: pillow==11.3.0
24
24
  Requires-Dist: psycopg==3.2.9
25
25
  Requires-Dist: rcssmin==1.2.1
@@ -31,11 +31,11 @@ Provides-Extra: dev
31
31
  Requires-Dist: djlint==1.36.4; extra == 'dev'
32
32
  Requires-Dist: hatch==1.14.1; extra == 'dev'
33
33
  Requires-Dist: isort==6.0.1; extra == 'dev'
34
- Requires-Dist: mkdocs-material==9.6.15; extra == 'dev'
34
+ Requires-Dist: mkdocs-material==9.6.16; extra == 'dev'
35
35
  Requires-Dist: mkdocs-static-i18n==1.3.0; extra == 'dev'
36
36
  Requires-Dist: mkdocs==1.6.1; extra == 'dev'
37
- Requires-Dist: pymdown-extensions==10.16; extra == 'dev'
38
- Requires-Dist: ruff==0.12.2; extra == 'dev'
37
+ Requires-Dist: pymdown-extensions==10.16.1; extra == 'dev'
38
+ Requires-Dist: ruff==0.12.8; extra == 'dev'
39
39
  Requires-Dist: vermin==1.6.0; extra == 'dev'
40
40
  Provides-Extra: docker
41
41
  Requires-Dist: uvicorn==0.35.0; extra == 'docker'
@@ -43,12 +43,12 @@ Provides-Extra: s3
43
43
  Requires-Dist: django-storages[s3]==1.14.6; extra == 's3'
44
44
  Provides-Extra: sync
45
45
  Requires-Dist: pydantic==2.11.7; extra == 'sync'
46
- Requires-Dist: redis==6.2.0; extra == 'sync'
46
+ Requires-Dist: redis==6.4.0; extra == 'sync'
47
47
  Requires-Dist: websockets==15.0.1; extra == 'sync'
48
48
  Provides-Extra: test
49
- Requires-Dist: daphne==4.2.0; extra == 'test'
49
+ Requires-Dist: daphne==4.2.1; extra == 'test'
50
50
  Requires-Dist: factory-boy==3.3.3; extra == 'test'
51
- Requires-Dist: moto[s3]==5.1.6; extra == 'test'
51
+ Requires-Dist: moto[s3]==5.1.9; extra == 'test'
52
52
  Requires-Dist: playwright>=1.39; extra == 'test'
53
53
  Requires-Dist: pytest-django==4.11.1; extra == 'test'
54
54
  Requires-Dist: pytest-playwright==0.7.0; extra == 'test'