umap-project 2.6.0__py3-none-any.whl → 2.6.0b0__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.
- umap/__init__.py +1 -1
- umap/locale/en/LC_MESSAGES/django.po +3 -3
- umap/locale/fa_IR/LC_MESSAGES/django.mo +0 -0
- umap/locale/fa_IR/LC_MESSAGES/django.po +9 -9
- umap/locale/hu/LC_MESSAGES/django.mo +0 -0
- umap/locale/hu/LC_MESSAGES/django.po +18 -18
- umap/settings/base.py +0 -6
- umap/static/umap/js/modules/autocomplete.js +9 -5
- umap/static/umap/js/modules/data/features.js +13 -12
- umap/static/umap/js/modules/data/layer.js +1 -1
- umap/static/umap/js/modules/importers/overpass.js +8 -22
- umap/static/umap/js/modules/rendering/ui.js +4 -41
- umap/static/umap/js/modules/rules.js +3 -16
- umap/static/umap/js/modules/schema.js +1 -1
- umap/static/umap/js/umap.controls.js +1 -2
- umap/static/umap/js/umap.forms.js +5 -9
- umap/static/umap/js/umap.js +2 -7
- umap/static/umap/locale/am_ET.js +2 -8
- umap/static/umap/locale/am_ET.json +2 -8
- umap/static/umap/locale/ar.js +2 -8
- umap/static/umap/locale/ar.json +2 -8
- umap/static/umap/locale/ast.js +2 -8
- umap/static/umap/locale/ast.json +2 -8
- umap/static/umap/locale/bg.js +2 -8
- umap/static/umap/locale/bg.json +2 -8
- umap/static/umap/locale/br.js +2 -8
- umap/static/umap/locale/br.json +2 -8
- umap/static/umap/locale/ca.js +12 -18
- umap/static/umap/locale/ca.json +12 -18
- umap/static/umap/locale/cs_CZ.js +2 -8
- umap/static/umap/locale/cs_CZ.json +2 -8
- umap/static/umap/locale/da.js +2 -8
- umap/static/umap/locale/da.json +2 -8
- umap/static/umap/locale/de.js +2 -8
- umap/static/umap/locale/de.json +2 -8
- umap/static/umap/locale/el.js +2 -8
- umap/static/umap/locale/el.json +2 -8
- umap/static/umap/locale/en.js +2 -4
- umap/static/umap/locale/en.json +2 -4
- umap/static/umap/locale/en_US.json +2 -8
- umap/static/umap/locale/es.js +2 -8
- umap/static/umap/locale/es.json +2 -8
- umap/static/umap/locale/et.js +2 -8
- umap/static/umap/locale/et.json +2 -8
- umap/static/umap/locale/eu.js +338 -346
- umap/static/umap/locale/eu.json +338 -346
- umap/static/umap/locale/fa_IR.js +365 -373
- umap/static/umap/locale/fa_IR.json +365 -373
- umap/static/umap/locale/fi.js +2 -8
- umap/static/umap/locale/fi.json +2 -8
- umap/static/umap/locale/fr.js +2 -4
- umap/static/umap/locale/fr.json +2 -4
- umap/static/umap/locale/gl.js +2 -8
- umap/static/umap/locale/gl.json +2 -8
- umap/static/umap/locale/he.js +2 -8
- umap/static/umap/locale/he.json +2 -8
- umap/static/umap/locale/hr.js +2 -8
- umap/static/umap/locale/hr.json +2 -8
- umap/static/umap/locale/hu.js +23 -31
- umap/static/umap/locale/hu.json +23 -31
- umap/static/umap/locale/id.js +2 -8
- umap/static/umap/locale/id.json +2 -8
- umap/static/umap/locale/is.js +2 -8
- umap/static/umap/locale/is.json +2 -8
- umap/static/umap/locale/it.js +2 -8
- umap/static/umap/locale/it.json +2 -8
- umap/static/umap/locale/ja.js +2 -8
- umap/static/umap/locale/ja.json +2 -8
- umap/static/umap/locale/ko.js +2 -8
- umap/static/umap/locale/ko.json +2 -8
- umap/static/umap/locale/lt.js +2 -8
- umap/static/umap/locale/lt.json +2 -8
- umap/static/umap/locale/ms.js +2 -8
- umap/static/umap/locale/ms.json +2 -8
- umap/static/umap/locale/nl.js +2 -8
- umap/static/umap/locale/nl.json +2 -8
- umap/static/umap/locale/no.js +2 -8
- umap/static/umap/locale/no.json +2 -8
- umap/static/umap/locale/pl.js +48 -54
- umap/static/umap/locale/pl.json +48 -54
- umap/static/umap/locale/pl_PL.json +2 -8
- umap/static/umap/locale/pt.js +2 -8
- umap/static/umap/locale/pt.json +2 -8
- umap/static/umap/locale/pt_BR.js +2 -8
- umap/static/umap/locale/pt_BR.json +2 -8
- umap/static/umap/locale/pt_PT.js +2 -8
- umap/static/umap/locale/pt_PT.json +2 -8
- umap/static/umap/locale/ro.js +2 -8
- umap/static/umap/locale/ro.json +2 -8
- umap/static/umap/locale/ru.js +2 -8
- umap/static/umap/locale/ru.json +2 -8
- umap/static/umap/locale/sk_SK.js +2 -8
- umap/static/umap/locale/sk_SK.json +2 -8
- umap/static/umap/locale/sl.js +2 -8
- umap/static/umap/locale/sl.json +2 -8
- umap/static/umap/locale/sr.js +2 -8
- umap/static/umap/locale/sr.json +2 -8
- umap/static/umap/locale/sv.js +2 -8
- umap/static/umap/locale/sv.json +2 -8
- umap/static/umap/locale/th_TH.js +2 -8
- umap/static/umap/locale/th_TH.json +2 -8
- umap/static/umap/locale/tr.js +2 -8
- umap/static/umap/locale/tr.json +2 -8
- umap/static/umap/locale/uk_UA.js +2 -8
- umap/static/umap/locale/uk_UA.json +2 -8
- umap/static/umap/locale/vi.js +2 -8
- umap/static/umap/locale/vi.json +2 -8
- umap/static/umap/locale/vi_VN.json +2 -8
- umap/static/umap/locale/zh.js +2 -8
- umap/static/umap/locale/zh.json +2 -8
- umap/static/umap/locale/zh_CN.json +2 -8
- umap/static/umap/locale/zh_TW.Big5.json +2 -8
- umap/static/umap/locale/zh_TW.js +96 -102
- umap/static/umap/locale/zh_TW.json +96 -102
- umap/static/umap/map.css +4 -4
- umap/static/umap/vars.css +0 -1
- umap/static/umap/vendors/editable/Leaflet.Editable.js +1937 -2079
- umap/static/umap/vendors/markercluster/MarkerCluster.Default.css +1 -1
- umap/templates/umap/content_footer.html +1 -1
- umap/templates/umap/map_list.html +1 -3
- umap/tests/integration/test_browser.py +0 -20
- umap/tests/integration/test_conditional_rules.py +17 -102
- umap/tests/integration/test_draw_polygon.py +0 -28
- umap/tests/integration/test_edit_datalayer.py +2 -2
- umap/tests/integration/test_import.py +0 -60
- umap/tests/integration/test_querystring.py +0 -7
- {umap_project-2.6.0.dist-info → umap_project-2.6.0b0.dist-info}/METADATA +10 -10
- {umap_project-2.6.0.dist-info → umap_project-2.6.0b0.dist-info}/RECORD +131 -131
- {umap_project-2.6.0.dist-info → umap_project-2.6.0b0.dist-info}/WHEEL +0 -0
- {umap_project-2.6.0.dist-info → umap_project-2.6.0b0.dist-info}/entry_points.txt +0 -0
- {umap_project-2.6.0.dist-info → umap_project-2.6.0b0.dist-info}/licenses/LICENSE +0 -0
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{% for language in languages %}
|
|
15
15
|
<option value="{{ language.code }}"
|
|
16
16
|
{% if language.code == LANGUAGE_CODE %}selected="selected"{% endif %}>
|
|
17
|
-
{{ language.name_local }}
|
|
17
|
+
{{ language.name_local }}
|
|
18
18
|
</option>
|
|
19
19
|
{% endfor %}
|
|
20
20
|
</select>
|
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
<div class="legend">
|
|
8
8
|
<a href="{{ map_inst.get_absolute_url }}">{{ map_inst.name }}</a>
|
|
9
9
|
{% with author=map_inst.get_author %}
|
|
10
|
-
{%
|
|
11
|
-
<em>{% trans "by" %} <a href="{{ author.get_url }}">{{ author }}</a></em>
|
|
12
|
-
{% endif %}
|
|
10
|
+
<em>{% trans "by" %} <a href="{{ author.get_url }}">{{ author }}</a></em>
|
|
13
11
|
{% endwith %}
|
|
14
12
|
</div>
|
|
15
13
|
</div>
|
|
@@ -176,26 +176,6 @@ def test_filter_works_with_variable_in_labelKey(live_server, page, map):
|
|
|
176
176
|
expect(paths).to_have_count(1) # Only polygon
|
|
177
177
|
|
|
178
178
|
|
|
179
|
-
def test_filter_works_with_missing_name(live_server, page, map):
|
|
180
|
-
map.settings["properties"]["onLoadPanel"] = "databrowser"
|
|
181
|
-
map.save()
|
|
182
|
-
data = deepcopy(DATALAYER_DATA)
|
|
183
|
-
del data["features"][0]["properties"]["name"]
|
|
184
|
-
DataLayerFactory(map=map, data=data, name="foobar")
|
|
185
|
-
page.goto(f"{live_server.url}{map.get_absolute_url()}")
|
|
186
|
-
expect(page.get_by_title("Features in this layer: 3")).to_be_visible()
|
|
187
|
-
markers = page.locator(".leaflet-marker-icon")
|
|
188
|
-
paths = page.locator(".leaflet-overlay-pane path")
|
|
189
|
-
expect(markers).to_have_count(1)
|
|
190
|
-
expect(paths).to_have_count(2)
|
|
191
|
-
page.locator(".filters summary").click()
|
|
192
|
-
filter_ = page.locator("input[name='filter']")
|
|
193
|
-
expect(filter_).to_be_visible()
|
|
194
|
-
filter_.type("foob")
|
|
195
|
-
expect(markers).to_have_count(1)
|
|
196
|
-
expect(paths).to_have_count(0)
|
|
197
|
-
|
|
198
|
-
|
|
199
179
|
def test_data_browser_can_show_only_visible_features(live_server, page, bootstrap, map):
|
|
200
180
|
# Zoom on France
|
|
201
181
|
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/51.000/2.000")
|
|
@@ -24,7 +24,6 @@ DATALAYER_DATA1 = {
|
|
|
24
24
|
"mynumber": 10,
|
|
25
25
|
"myboolean": True,
|
|
26
26
|
"mydate": "2024/04/14 12:19:17",
|
|
27
|
-
"maybeempty": "not empty",
|
|
28
27
|
},
|
|
29
28
|
"geometry": {"type": "Point", "coordinates": [0.065918, 48.385442]},
|
|
30
29
|
},
|
|
@@ -36,7 +35,6 @@ DATALAYER_DATA1 = {
|
|
|
36
35
|
"mynumber": 12,
|
|
37
36
|
"myboolean": False,
|
|
38
37
|
"mydate": "2024/03/13 12:20:20",
|
|
39
|
-
"maybeempty": "",
|
|
40
38
|
},
|
|
41
39
|
"geometry": {"type": "Point", "coordinates": [3.55957, 49.767074]},
|
|
42
40
|
},
|
|
@@ -58,7 +56,6 @@ DATALAYER_DATA2 = {
|
|
|
58
56
|
"mynumber": 10,
|
|
59
57
|
"myboolean": "true",
|
|
60
58
|
"mydate": "2024/08/18 13:14:15",
|
|
61
|
-
"maybeempty": None,
|
|
62
59
|
},
|
|
63
60
|
"geometry": {"type": "Point", "coordinates": [0.856934, 45.290347]},
|
|
64
61
|
},
|
|
@@ -72,18 +69,6 @@ DATALAYER_DATA2 = {
|
|
|
72
69
|
},
|
|
73
70
|
"geometry": {"type": "Point", "coordinates": [4.372559, 47.945786]},
|
|
74
71
|
},
|
|
75
|
-
{
|
|
76
|
-
"type": "Feature",
|
|
77
|
-
"properties": {
|
|
78
|
-
"mytype": "odd",
|
|
79
|
-
"name": "Point 5",
|
|
80
|
-
"mynumber": 10,
|
|
81
|
-
"mydate": "2024-04-14T10:19:17.000Z",
|
|
82
|
-
"myboolean": "notaboolean",
|
|
83
|
-
"maybeempty": "foo",
|
|
84
|
-
},
|
|
85
|
-
"geometry": {"type": "Point", "coordinates": [4.1, 47.3]},
|
|
86
|
-
},
|
|
87
72
|
],
|
|
88
73
|
"_umap_options": {
|
|
89
74
|
"name": "Calque 2",
|
|
@@ -100,9 +85,9 @@ def test_simple_equal_rule_at_load(live_server, page, map):
|
|
|
100
85
|
DataLayerFactory(map=map, data=DATALAYER_DATA2)
|
|
101
86
|
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
|
|
102
87
|
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
103
|
-
expect(markers).to_have_count(
|
|
88
|
+
expect(markers).to_have_count(4)
|
|
104
89
|
colors = getColors(markers)
|
|
105
|
-
assert colors.count("rgb(240, 248, 255)") ==
|
|
90
|
+
assert colors.count("rgb(240, 248, 255)") == 2
|
|
106
91
|
|
|
107
92
|
|
|
108
93
|
def test_simple_not_equal_rule_at_load(live_server, page, map):
|
|
@@ -114,9 +99,9 @@ def test_simple_not_equal_rule_at_load(live_server, page, map):
|
|
|
114
99
|
DataLayerFactory(map=map, data=DATALAYER_DATA2)
|
|
115
100
|
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
|
|
116
101
|
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
117
|
-
expect(markers).to_have_count(
|
|
102
|
+
expect(markers).to_have_count(4)
|
|
118
103
|
colors = getColors(markers)
|
|
119
|
-
assert colors.count("rgb(240, 248, 255)") ==
|
|
104
|
+
assert colors.count("rgb(240, 248, 255)") == 2
|
|
120
105
|
|
|
121
106
|
|
|
122
107
|
def test_gt_rule_with_number_at_load(live_server, page, map):
|
|
@@ -128,7 +113,7 @@ def test_gt_rule_with_number_at_load(live_server, page, map):
|
|
|
128
113
|
DataLayerFactory(map=map, data=DATALAYER_DATA2)
|
|
129
114
|
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
|
|
130
115
|
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
131
|
-
expect(markers).to_have_count(
|
|
116
|
+
expect(markers).to_have_count(4)
|
|
132
117
|
colors = getColors(markers)
|
|
133
118
|
assert colors.count("rgb(240, 248, 255)") == 2
|
|
134
119
|
|
|
@@ -142,9 +127,9 @@ def test_lt_rule_with_number_at_load(live_server, page, map):
|
|
|
142
127
|
DataLayerFactory(map=map, data=DATALAYER_DATA2)
|
|
143
128
|
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
|
|
144
129
|
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
145
|
-
expect(markers).to_have_count(
|
|
130
|
+
expect(markers).to_have_count(4)
|
|
146
131
|
colors = getColors(markers)
|
|
147
|
-
assert colors.count("rgb(240, 248, 255)") ==
|
|
132
|
+
assert colors.count("rgb(240, 248, 255)") == 3
|
|
148
133
|
|
|
149
134
|
|
|
150
135
|
def test_lt_rule_with_float_at_load(live_server, page, map):
|
|
@@ -156,9 +141,9 @@ def test_lt_rule_with_float_at_load(live_server, page, map):
|
|
|
156
141
|
DataLayerFactory(map=map, data=DATALAYER_DATA2)
|
|
157
142
|
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
|
|
158
143
|
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
159
|
-
expect(markers).to_have_count(
|
|
144
|
+
expect(markers).to_have_count(4)
|
|
160
145
|
colors = getColors(markers)
|
|
161
|
-
assert colors.count("rgb(240, 248, 255)") ==
|
|
146
|
+
assert colors.count("rgb(240, 248, 255)") == 3
|
|
162
147
|
|
|
163
148
|
|
|
164
149
|
def test_equal_rule_with_boolean_at_load(live_server, page, map):
|
|
@@ -170,77 +155,7 @@ def test_equal_rule_with_boolean_at_load(live_server, page, map):
|
|
|
170
155
|
DataLayerFactory(map=map, data=DATALAYER_DATA2)
|
|
171
156
|
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
|
|
172
157
|
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
173
|
-
expect(markers).to_have_count(
|
|
174
|
-
colors = getColors(markers)
|
|
175
|
-
assert colors.count("rgb(240, 248, 255)") == 2
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
def test_equal_rule_with_boolean_not_true_at_load(live_server, page, map):
|
|
179
|
-
map.settings["properties"]["rules"] = [
|
|
180
|
-
{"condition": "myboolean!=true", "options": {"color": "aliceblue"}}
|
|
181
|
-
]
|
|
182
|
-
map.save()
|
|
183
|
-
DataLayerFactory(map=map, data=DATALAYER_DATA1)
|
|
184
|
-
DataLayerFactory(map=map, data=DATALAYER_DATA2)
|
|
185
|
-
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
|
|
186
|
-
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
187
|
-
expect(markers).to_have_count(5)
|
|
188
|
-
colors = getColors(markers)
|
|
189
|
-
assert colors.count("rgb(240, 248, 255)") == 3
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
def test_equal_rule_with_boolean_false_at_load(live_server, page, map):
|
|
193
|
-
map.settings["properties"]["rules"] = [
|
|
194
|
-
{"condition": "myboolean=false", "options": {"color": "aliceblue"}}
|
|
195
|
-
]
|
|
196
|
-
map.save()
|
|
197
|
-
DataLayerFactory(map=map, data=DATALAYER_DATA1)
|
|
198
|
-
DataLayerFactory(map=map, data=DATALAYER_DATA2)
|
|
199
|
-
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
|
|
200
|
-
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
201
|
-
expect(markers).to_have_count(5)
|
|
202
|
-
colors = getColors(markers)
|
|
203
|
-
assert colors.count("rgb(240, 248, 255)") == 1
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
def test_equal_rule_with_boolean_not_false_at_load(live_server, page, map):
|
|
207
|
-
map.settings["properties"]["rules"] = [
|
|
208
|
-
{"condition": "myboolean!=false", "options": {"color": "aliceblue"}}
|
|
209
|
-
]
|
|
210
|
-
map.save()
|
|
211
|
-
DataLayerFactory(map=map, data=DATALAYER_DATA1)
|
|
212
|
-
DataLayerFactory(map=map, data=DATALAYER_DATA2)
|
|
213
|
-
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
|
|
214
|
-
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
215
|
-
expect(markers).to_have_count(5)
|
|
216
|
-
colors = getColors(markers)
|
|
217
|
-
assert colors.count("rgb(240, 248, 255)") == 4
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
def test_empty_rule_at_load(live_server, page, map):
|
|
221
|
-
map.settings["properties"]["rules"] = [
|
|
222
|
-
{"condition": "maybeempty=", "options": {"color": "aliceblue"}}
|
|
223
|
-
]
|
|
224
|
-
map.save()
|
|
225
|
-
DataLayerFactory(map=map, data=DATALAYER_DATA1)
|
|
226
|
-
DataLayerFactory(map=map, data=DATALAYER_DATA2)
|
|
227
|
-
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
|
|
228
|
-
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
229
|
-
expect(markers).to_have_count(5)
|
|
230
|
-
colors = getColors(markers)
|
|
231
|
-
assert colors.count("rgb(240, 248, 255)") == 3
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
def test_not_empty_rule_at_load(live_server, page, map):
|
|
235
|
-
map.settings["properties"]["rules"] = [
|
|
236
|
-
{"condition": "maybeempty!=", "options": {"color": "aliceblue"}}
|
|
237
|
-
]
|
|
238
|
-
map.save()
|
|
239
|
-
DataLayerFactory(map=map, data=DATALAYER_DATA1)
|
|
240
|
-
DataLayerFactory(map=map, data=DATALAYER_DATA2)
|
|
241
|
-
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.948/1.670")
|
|
242
|
-
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
243
|
-
expect(markers).to_have_count(5)
|
|
158
|
+
expect(markers).to_have_count(4)
|
|
244
159
|
colors = getColors(markers)
|
|
245
160
|
assert colors.count("rgb(240, 248, 255)") == 2
|
|
246
161
|
|
|
@@ -250,7 +165,7 @@ def test_can_create_new_rule(live_server, page, openmap):
|
|
|
250
165
|
DataLayerFactory(map=openmap, data=DATALAYER_DATA2)
|
|
251
166
|
page.goto(f"{live_server.url}{openmap.get_absolute_url()}#6/48.948/1.670")
|
|
252
167
|
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
253
|
-
expect(markers).to_have_count(
|
|
168
|
+
expect(markers).to_have_count(4)
|
|
254
169
|
page.get_by_role("button", name="Edit").click()
|
|
255
170
|
page.get_by_role("link", name="Map advanced properties").click()
|
|
256
171
|
page.get_by_text("Conditional style rules").click()
|
|
@@ -260,7 +175,7 @@ def test_can_create_new_rule(live_server, page, openmap):
|
|
|
260
175
|
page.locator(".umap-field-color .define").first.click()
|
|
261
176
|
page.get_by_title("AliceBlue").first.click()
|
|
262
177
|
colors = getColors(markers)
|
|
263
|
-
assert colors.count("rgb(240, 248, 255)") ==
|
|
178
|
+
assert colors.count("rgb(240, 248, 255)") == 2
|
|
264
179
|
|
|
265
180
|
|
|
266
181
|
def test_can_deactive_rule_from_list(live_server, page, openmap):
|
|
@@ -272,9 +187,9 @@ def test_can_deactive_rule_from_list(live_server, page, openmap):
|
|
|
272
187
|
DataLayerFactory(map=openmap, data=DATALAYER_DATA2)
|
|
273
188
|
page.goto(f"{live_server.url}{openmap.get_absolute_url()}#6/48.948/1.670")
|
|
274
189
|
markers = page.locator(".leaflet-marker-icon .icon_container")
|
|
275
|
-
expect(markers).to_have_count(
|
|
190
|
+
expect(markers).to_have_count(4)
|
|
276
191
|
colors = getColors(markers)
|
|
277
|
-
assert colors.count("rgb(240, 248, 255)") ==
|
|
192
|
+
assert colors.count("rgb(240, 248, 255)") == 2
|
|
278
193
|
page.get_by_role("button", name="Edit").click()
|
|
279
194
|
page.get_by_role("link", name="Map advanced properties").click()
|
|
280
195
|
page.get_by_text("Conditional style rules").click()
|
|
@@ -283,7 +198,7 @@ def test_can_deactive_rule_from_list(live_server, page, openmap):
|
|
|
283
198
|
assert colors.count("rgb(240, 248, 255)") == 0
|
|
284
199
|
page.get_by_role("button", name="Show/hide layer").click()
|
|
285
200
|
colors = getColors(markers)
|
|
286
|
-
assert colors.count("rgb(240, 248, 255)") ==
|
|
201
|
+
assert colors.count("rgb(240, 248, 255)") == 2
|
|
287
202
|
|
|
288
203
|
|
|
289
204
|
def test_autocomplete_datalist(live_server, page, openmap):
|
|
@@ -294,9 +209,9 @@ def test_autocomplete_datalist(live_server, page, openmap):
|
|
|
294
209
|
page.get_by_role("button", name="Add rule").click()
|
|
295
210
|
panel = page.locator(".panel.right.on")
|
|
296
211
|
datalist = panel.locator(".umap-field-condition datalist option")
|
|
297
|
-
expect(datalist).to_have_count(
|
|
212
|
+
expect(datalist).to_have_count(5)
|
|
298
213
|
values = {option.inner_text() for option in datalist.all()}
|
|
299
|
-
assert values == {"myboolean", "mytype", "mynumber", "mydate", "name"
|
|
214
|
+
assert values == {"myboolean", "mytype", "mynumber", "mydate", "name"}
|
|
300
215
|
page.get_by_placeholder("key=value or key!=value").fill("mytype")
|
|
301
216
|
expect(datalist).to_have_count(4)
|
|
302
217
|
values = {option.inner_text() for option in datalist.all()}
|
|
@@ -464,31 +464,3 @@ def test_can_draw_a_polygon_and_invert_it(live_server, page, tilelayer, settings
|
|
|
464
464
|
# Click elsewhere on the map, it should now show the popup
|
|
465
465
|
map.click(position={"x": 250, "y": 250})
|
|
466
466
|
expect(popup).to_be_visible()
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
def test_vertexmarker_not_shown_if_too_many(live_server, map, page, settings):
|
|
470
|
-
geojson = '{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[3.350602,48.438077],[3.349287,48.438082],[3.34921,48.438124],[3.348519,48.438108],[3.34546,48.437416],[3.343752,48.436955],[3.339092,48.435705],[3.333756,48.434278],[3.330224,48.433336],[3.326293,48.43229],[3.323154,48.430374],[3.32129,48.429238],[3.321234,48.429191],[3.321164,48.429221],[3.320893,48.429117],[3.320766,48.42912],[3.320575,48.429213],[3.320289,48.429303],[3.320042,48.429427],[3.319659,48.429542],[3.319215,48.429622],[3.318547,48.429691],[3.317845,48.429671],[3.317751,48.429698],[3.316503,48.430404],[3.316247,48.430481],[3.316101,48.431152],[3.316181,48.431164],[3.315466,48.432852],[3.315229,48.432981],[3.314785,48.433076],[3.314588,48.432699],[3.314474,48.432376],[3.314197,48.431965],[3.313812,48.431626],[3.313264,48.431253],[3.312393,48.430865],[3.311687,48.43069],[3.311471,48.430693],[3.311199,48.430622],[3.310632,48.430628],[3.30879,48.430373],[3.307032,48.430298],[3.306597,48.430211],[3.306301,48.430213],[3.306137,48.430161],[3.305651,48.430165],[3.304839,48.430046],[3.303726,48.429803],[3.302861,48.42972],[3.302237,48.429635],[3.300559,48.429488],[3.300396,48.429435],[3.299502,48.429335],[3.298528,48.429198],[3.298176,48.429201],[3.296263,48.429039],[3.296267,48.429307],[3.296237,48.429425],[3.295882,48.429848],[3.295665,48.429789],[3.295397,48.430056],[3.295377,48.430132],[3.295186,48.430421],[3.295198,48.430531],[3.295344,48.430735],[3.296077,48.431333],[3.295938,48.431617],[3.29576,48.43168],[3.294082,48.431442],[3.292288,48.431198],[3.292303,48.431101],[3.29082,48.431007],[3.29043,48.430975],[3.290451,48.431129],[3.290115,48.431105],[3.289097,48.430993],[3.289185,48.430805],[3.288545,48.430699],[3.288311,48.430684],[3.287686,48.430687],[3.287456,48.431129],[3.287465,48.43122],[3.288277,48.431574],[3.28896,48.431915],[3.288937,48.431969],[3.289431,48.432499],[3.289672,48.43292],[3.289871,48.433156],[3.29036,48.433602],[3.290557,48.433724],[3.290781,48.433809],[3.291035,48.433857],[3.291537,48.434024],[3.291819,48.434151],[3.292118,48.434341],[3.292479,48.434677],[3.292929,48.435388],[3.293207,48.435792],[3.293881,48.43672],[3.293762,48.436772],[3.294056,48.437209],[3.294117,48.437385],[3.294618,48.437579],[3.294465,48.437764],[3.294424,48.438087],[3.294357,48.438293],[3.293776,48.438817],[3.293308,48.439323],[3.292929,48.439844],[3.292671,48.440235],[3.29233,48.440924],[3.291807,48.441432],[3.29161,48.441661],[3.291402,48.44196],[3.291265,48.442663],[3.291255,48.442806],[3.291328,48.443126],[3.291407,48.443202],[3.291574,48.443473],[3.292253,48.444495],[3.292329,48.444596],[3.293056,48.445276],[3.293138,48.445309],[3.293368,48.445628],[3.293661,48.445985],[3.29374,48.446117],[3.29396,48.446372],[3.294304,48.446627],[3.294761,48.446912],[3.295881,48.447668],[3.295849,48.447688],[3.296837,48.448338],[3.297547,48.44891],[3.297465,48.44892],[3.297188,48.449195],[3.297597,48.449543],[3.297753,48.449701],[3.297845,48.449851],[3.298264,48.450055],[3.298478,48.450121],[3.298946,48.450221],[3.299309,48.450317],[3.299359,48.450237],[3.300493,48.450461],[3.301087,48.450674],[3.301703,48.45101],[3.301995,48.451197],[3.3024,48.451534],[3.302702,48.45174],[3.303329,48.452007],[3.304029,48.452197],[3.304569,48.452446],[3.304803,48.452502],[3.305096,48.452877],[3.30567,48.453409],[3.305998,48.453617],[3.306329,48.453567],[3.306999,48.453359],[3.307147,48.453453],[3.307452,48.453162],[3.307621,48.452853],[3.307637,48.452428],[3.307707,48.452345],[3.307741,48.452152],[3.307605,48.451823],[3.307551,48.45153],[3.307474,48.451395],[3.307218,48.451316],[3.307069,48.45119],[3.307261,48.450528],[3.307483,48.449868],[3.307603,48.449365],[3.30774,48.448909],[3.307598,48.448808],[3.307761,48.448604],[3.307863,48.447956],[3.307886,48.447645],[3.307972,48.447245],[3.308239,48.446362],[3.308306,48.446042],[3.308487,48.445329],[3.308442,48.444844],[3.308479,48.444713],[3.308967,48.443542],[3.309235,48.442927],[3.309464,48.442289],[3.309372,48.442046],[3.309621,48.441616],[3.310152,48.441065],[3.310213,48.440729],[3.310237,48.440329],[3.310167,48.439906],[3.31076,48.439111],[3.31118,48.438009],[3.311161,48.437961],[3.311906,48.437902],[3.312261,48.437839],[3.312486,48.437744],[3.31306,48.437674],[3.312613,48.438361],[3.312487,48.43883],[3.312493,48.439136],[3.312443,48.439388],[3.312598,48.440393],[3.312739,48.440752],[3.312879,48.440985],[3.313263,48.441305],[3.313916,48.441515],[3.314457,48.441565],[3.315105,48.44156],[3.31581,48.441607],[3.317056,48.441849],[3.318361,48.442198],[3.319041,48.442408],[3.319287,48.442604],[3.319343,48.442711],[3.320216,48.443117],[3.320709,48.443437],[3.32126,48.444007],[3.321788,48.444776],[3.322181,48.445618],[3.322479,48.445616],[3.32283,48.445577],[3.323344,48.445663],[3.324048,48.445693],[3.324695,48.445562],[3.324992,48.445559],[3.325558,48.445482],[3.325963,48.445479],[3.327479,48.445592],[3.327939,48.445678],[3.328502,48.445481],[3.328942,48.445392],[3.329169,48.44538],[3.330112,48.445466],[3.330715,48.445575],[3.330881,48.44557],[3.332155,48.445373],[3.33243,48.445375],[3.332727,48.445438],[3.3332,48.445588],[3.333358,48.445683],[3.333737,48.446027],[3.333998,48.446169],[3.334135,48.446334],[3.334611,48.447294],[3.33488,48.447909],[3.334992,48.447959],[3.335297,48.448013],[3.336516,48.448161],[3.336874,48.44825],[3.337258,48.448531],[3.337442,48.448737],[3.337525,48.448936],[3.337649,48.448967],[3.338263,48.448902],[3.33836,48.44894],[3.338765,48.44921],[3.339281,48.449513],[3.339464,48.449515],[3.339877,48.448856],[3.339867,48.448673],[3.340611,48.447311],[3.341744,48.447535],[3.343846,48.447943],[3.345266,48.448152],[3.345478,48.447345],[3.345816,48.446774],[3.345976,48.446809],[3.346142,48.44657],[3.346,48.446493],[3.346043,48.446099],[3.346047,48.445835],[3.346203,48.44558],[3.34717,48.444977],[3.347471,48.444638],[3.347571,48.444466],[3.347583,48.444183],[3.347678,48.443989],[3.348162,48.443428],[3.348326,48.443259],[3.348351,48.443136],[3.34831,48.442736],[3.348141,48.442484],[3.348246,48.442411],[3.348271,48.442293],[3.348097,48.442202],[3.347875,48.442142],[3.347773,48.441997],[3.34751,48.441531],[3.347394,48.441212],[3.349317,48.441364],[3.349478,48.441055],[3.349528,48.44103],[3.350119,48.441039],[3.350252,48.440793],[3.35052,48.440779],[3.350618,48.440612],[3.35069,48.440129],[3.350806,48.43921],[3.350792,48.439037],[3.350698,48.438594],[3.350566,48.438327],[3.350602,48.438077]]]},"properties":{"nom":"Grisy-sur-Seine","code":"77218","codeDepartement":"77","siren":"217702182","codeEpci":"200040251","codeRegion":"11","codesPostaux":["77480"],"population":107},"id":"g0OTg"}'
|
|
471
|
-
settings.UMAP_ALLOW_ANONYMOUS = True
|
|
472
|
-
page.goto(f"{live_server.url}/en/map/new/#15/48.4395/3.3189")
|
|
473
|
-
page.get_by_title("Import data").click()
|
|
474
|
-
page.locator(".umap-upload textarea").fill(geojson)
|
|
475
|
-
page.locator('select[name="format"]').select_option("geojson")
|
|
476
|
-
page.get_by_role("button", name="Import data", exact=True).click()
|
|
477
|
-
page.locator("path").click()
|
|
478
|
-
page.get_by_role("link", name="Toggle edit mode (⇧+Click)").click()
|
|
479
|
-
expect(page.locator("#umap-tooltip-container")).to_contain_text(
|
|
480
|
-
"Please zoom in to edit the geometry"
|
|
481
|
-
)
|
|
482
|
-
expect(page.locator(".leaflet-vertex-icon")).to_be_hidden()
|
|
483
|
-
page.get_by_label("Zoom in").click()
|
|
484
|
-
expect(page.locator("#umap-tooltip-container")).to_contain_text(
|
|
485
|
-
"Please zoom in to edit the geometry"
|
|
486
|
-
)
|
|
487
|
-
page.get_by_label("Zoom in").click()
|
|
488
|
-
page.wait_for_timeout(500)
|
|
489
|
-
page.get_by_label("Zoom out").click()
|
|
490
|
-
page.wait_for_timeout(500)
|
|
491
|
-
expect(page.locator(".leaflet-vertex-icon")).to_be_hidden()
|
|
492
|
-
expect(page.locator("#umap-tooltip-container")).to_contain_text(
|
|
493
|
-
"Please zoom in to edit the geometry"
|
|
494
|
-
)
|
|
@@ -114,7 +114,7 @@ def test_can_change_icon_class(live_server, openmap, page):
|
|
|
114
114
|
|
|
115
115
|
def test_can_change_name(live_server, openmap, page, datalayer):
|
|
116
116
|
page.goto(
|
|
117
|
-
f"{live_server.url}{openmap.get_absolute_url()}?edit&
|
|
117
|
+
f"{live_server.url}{openmap.get_absolute_url()}?edit&datalayersControl=expanded"
|
|
118
118
|
)
|
|
119
119
|
page.get_by_role("link", name="Manage layers").click()
|
|
120
120
|
page.locator(".panel.right").get_by_title("Edit", exact=True).click()
|
|
@@ -133,7 +133,7 @@ def test_can_change_name(live_server, openmap, page, datalayer):
|
|
|
133
133
|
|
|
134
134
|
def test_can_create_new_datalayer(live_server, openmap, page, datalayer):
|
|
135
135
|
page.goto(
|
|
136
|
-
f"{live_server.url}{openmap.get_absolute_url()}?edit&
|
|
136
|
+
f"{live_server.url}{openmap.get_absolute_url()}?edit&datalayersControl=expanded"
|
|
137
137
|
)
|
|
138
138
|
page.get_by_role("link", name="Manage layers").click()
|
|
139
139
|
page.get_by_role("button", name="Add a layer").click()
|
|
@@ -579,66 +579,6 @@ def test_overpass_import_with_bbox(page, live_server, tilelayer, settings):
|
|
|
579
579
|
)
|
|
580
580
|
|
|
581
581
|
|
|
582
|
-
def test_overpass_import_retains_boundary(page, live_server, tilelayer, settings):
|
|
583
|
-
settings.UMAP_IMPORTERS = {
|
|
584
|
-
"overpass": {
|
|
585
|
-
"url": "https://my.overpass.io/interpreter",
|
|
586
|
-
"searchUrl": "https://foobar.io/api?q={q}",
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
def handle(route):
|
|
591
|
-
route.fulfill(
|
|
592
|
-
json={
|
|
593
|
-
"features": [
|
|
594
|
-
{
|
|
595
|
-
"geometry": {
|
|
596
|
-
"coordinates": [3.2394035, 48.4149956],
|
|
597
|
-
"type": "Point",
|
|
598
|
-
},
|
|
599
|
-
"type": "Feature",
|
|
600
|
-
"properties": {
|
|
601
|
-
"osm_type": "R",
|
|
602
|
-
"osm_id": 1393025,
|
|
603
|
-
"extent": [3.2290211, 48.4268302, 3.2623032, 48.4041636],
|
|
604
|
-
"country": "France",
|
|
605
|
-
"osm_key": "place",
|
|
606
|
-
"countrycode": "FR",
|
|
607
|
-
"osm_value": "village",
|
|
608
|
-
"postcode": "77480",
|
|
609
|
-
"name": "Bray-sur-Seine",
|
|
610
|
-
"county": "Seine-et-Marne",
|
|
611
|
-
"state": "Île-de-France",
|
|
612
|
-
"type": "city",
|
|
613
|
-
},
|
|
614
|
-
}
|
|
615
|
-
],
|
|
616
|
-
"type": "FeatureCollection",
|
|
617
|
-
}
|
|
618
|
-
)
|
|
619
|
-
|
|
620
|
-
# Intercept the route
|
|
621
|
-
page.route(re.compile("https://foobar.io/api.*"), handle)
|
|
622
|
-
page.goto(f"{live_server.url}/map/new/")
|
|
623
|
-
page.get_by_role("link", name="Import data").click()
|
|
624
|
-
page.get_by_role("button", name="Overpass").click()
|
|
625
|
-
page.get_by_placeholder("amenity=drinking_water").fill("building")
|
|
626
|
-
page.get_by_placeholder("Type area name, or let empty").click()
|
|
627
|
-
page.get_by_placeholder("Type area name, or let empty").press_sequentially("bray")
|
|
628
|
-
page.get_by_text("Bray-sur-Seine, Seine-et-Marne, Île-de-France, France").click()
|
|
629
|
-
expect(page.locator("#area")).to_contain_text(
|
|
630
|
-
"Bray-sur-Seine, Seine-et-Marne, Île-de-France, France"
|
|
631
|
-
)
|
|
632
|
-
page.get_by_role("button", name="Choose this data").click()
|
|
633
|
-
expect(page.get_by_placeholder("Provide an URL here")).to_have_value(
|
|
634
|
-
"https://my.overpass.io/interpreter?data=[out:json];nwr[building](area:3601393025);out geom;"
|
|
635
|
-
)
|
|
636
|
-
page.get_by_role("button", name="Overpass").click()
|
|
637
|
-
expect(page.locator("#area")).to_contain_text(
|
|
638
|
-
"Bray-sur-Seine, Seine-et-Marne, Île-de-France, France"
|
|
639
|
-
)
|
|
640
|
-
|
|
641
|
-
|
|
642
582
|
def test_import_from_datasets(page, live_server, tilelayer, settings):
|
|
643
583
|
settings.UMAP_IMPORTERS = {
|
|
644
584
|
"datasets": {
|
|
@@ -33,13 +33,6 @@ def test_datalayers_control(map, live_server, datalayer, page):
|
|
|
33
33
|
page.goto(f"{live_server.url}{map.get_absolute_url()}?datalayersControl=expanded")
|
|
34
34
|
expect(control).to_be_visible()
|
|
35
35
|
expect(browser).to_be_visible()
|
|
36
|
-
# Should not override onLoadPanel
|
|
37
|
-
page.goto(
|
|
38
|
-
f"{live_server.url}{map.get_absolute_url()}?datalayersControl=expanded&onLoadPanel=caption"
|
|
39
|
-
)
|
|
40
|
-
expect(control).to_be_visible()
|
|
41
|
-
expect(browser).to_be_hidden()
|
|
42
|
-
expect(page.locator(".umap-caption")).to_be_visible()
|
|
43
36
|
|
|
44
37
|
|
|
45
38
|
def test_can_deactivate_wheel_from_query_string(map, live_server, page):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: umap-project
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.0b0
|
|
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,33 +19,33 @@ Requires-Python: >=3.10
|
|
|
19
19
|
Requires-Dist: django-agnocomplete==2.2.0
|
|
20
20
|
Requires-Dist: django-environ==0.11.2
|
|
21
21
|
Requires-Dist: django-probes==1.7.0
|
|
22
|
-
Requires-Dist: django==5.1
|
|
22
|
+
Requires-Dist: django==5.1
|
|
23
23
|
Requires-Dist: pillow==10.4.0
|
|
24
24
|
Requires-Dist: psycopg==3.2.1
|
|
25
|
-
Requires-Dist: pydantic==2.
|
|
25
|
+
Requires-Dist: pydantic==2.8.2
|
|
26
26
|
Requires-Dist: rcssmin==1.1.2
|
|
27
27
|
Requires-Dist: requests==2.32.3
|
|
28
28
|
Requires-Dist: rjsmin==1.2.2
|
|
29
29
|
Requires-Dist: social-auth-app-django==5.4.2
|
|
30
30
|
Requires-Dist: social-auth-core==4.5.4
|
|
31
|
-
Requires-Dist: websockets==13.0
|
|
31
|
+
Requires-Dist: websockets==13.0
|
|
32
32
|
Provides-Extra: dev
|
|
33
|
-
Requires-Dist: djlint==1.
|
|
33
|
+
Requires-Dist: djlint==1.34.1; extra == 'dev'
|
|
34
34
|
Requires-Dist: hatch==1.12.0; extra == 'dev'
|
|
35
35
|
Requires-Dist: isort==5.13.2; extra == 'dev'
|
|
36
|
-
Requires-Dist: mkdocs-material==9.5.
|
|
36
|
+
Requires-Dist: mkdocs-material==9.5.33; extra == 'dev'
|
|
37
37
|
Requires-Dist: mkdocs-static-i18n==1.2.3; extra == 'dev'
|
|
38
|
-
Requires-Dist: mkdocs==1.6.
|
|
38
|
+
Requires-Dist: mkdocs==1.6.0; extra == 'dev'
|
|
39
39
|
Requires-Dist: pymdown-extensions==10.9; extra == 'dev'
|
|
40
|
-
Requires-Dist: ruff==0.6.
|
|
40
|
+
Requires-Dist: ruff==0.6.2; extra == 'dev'
|
|
41
41
|
Requires-Dist: vermin==1.6.0; extra == 'dev'
|
|
42
42
|
Provides-Extra: docker
|
|
43
43
|
Requires-Dist: uwsgi==2.0.26; extra == 'docker'
|
|
44
44
|
Provides-Extra: test
|
|
45
45
|
Requires-Dist: factory-boy==3.3.1; extra == 'test'
|
|
46
46
|
Requires-Dist: playwright>=1.39; extra == 'test'
|
|
47
|
-
Requires-Dist: pytest-django==4.
|
|
48
|
-
Requires-Dist: pytest-playwright==0.5.
|
|
47
|
+
Requires-Dist: pytest-django==4.8.0; extra == 'test'
|
|
48
|
+
Requires-Dist: pytest-playwright==0.5.1; extra == 'test'
|
|
49
49
|
Requires-Dist: pytest-xdist<4,>=3.5.0; extra == 'test'
|
|
50
50
|
Requires-Dist: pytest==8.3.2; extra == 'test'
|
|
51
51
|
Description-Content-Type: text/markdown
|