Skip to content

Commit 8a3d86a

Browse files
committed
Update test notebooks so it's unlikely that there are diffs on the tiles
1 parent c91179b commit 8a3d86a

15 files changed

+175
-181
lines changed

ui-tests/notebooks/DivIcon.ipynb

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,15 @@
99
"source": [
1010
"from ipyleaflet import Marker, DivIcon, Map\n",
1111
"\n",
12-
"center = (52.204793, 360.121558)\n",
12+
"center = [48.265643898808236, 336.7529296875]\n",
1313
"\n",
14-
"m = Map(center=center, zoom=10)\n",
14+
"m = Map(center=center, zoom=7)\n",
1515
"icon = DivIcon(html='foo bar', bg_pos=[0, 0], icon_size=[150, 150])\n",
1616
"mark = Marker(location=center, icon=icon)\n",
1717
"m.add_layer(mark);\n",
1818
"\n",
1919
"m"
2020
]
21-
},
22-
{
23-
"cell_type": "code",
24-
"execution_count": null,
25-
"id": "e314f6c7-b36c-4021-ba13-caf49ade7111",
26-
"metadata": {},
27-
"outputs": [],
28-
"source": []
29-
},
30-
{
31-
"cell_type": "code",
32-
"execution_count": null,
33-
"id": "03c1de8d-b1bb-456d-aea6-0b2d22638909",
34-
"metadata": {},
35-
"outputs": [],
36-
"source": []
3721
}
3822
],
3923
"metadata": {
@@ -52,7 +36,14 @@
5236
"name": "python",
5337
"nbconvert_exporter": "python",
5438
"pygments_lexer": "ipython3",
55-
"version": "3.9.7"
39+
"version": "3.10.4"
40+
},
41+
"widgets": {
42+
"application/vnd.jupyter.widget-state+json": {
43+
"state": {},
44+
"version_major": 2,
45+
"version_minor": 0
46+
}
5647
}
5748
},
5849
"nbformat": 4,

ui-tests/notebooks/DrawControl.ipynb

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"source": [
1010
"from ipyleaflet import Map, basemaps, DrawControl\n",
1111
"\n",
12-
"center = (52.204793, 360.121558)\n",
12+
"center = [48.265643898808236, 336.7529296875]\n",
1313
"\n",
14-
"m = Map(center=center, zoom=15)\n",
14+
"m = Map(center=center, zoom=7)\n",
1515
"\n",
1616
"draw_control = DrawControl()\n",
1717
"draw_control.polyline = {\n",
@@ -52,14 +52,6 @@
5252
"\n",
5353
"m"
5454
]
55-
},
56-
{
57-
"cell_type": "code",
58-
"execution_count": null,
59-
"id": "6961a753-ba4f-45e2-92c4-b184fa384f27",
60-
"metadata": {},
61-
"outputs": [],
62-
"source": []
6355
}
6456
],
6557
"metadata": {
@@ -78,7 +70,14 @@
7870
"name": "python",
7971
"nbconvert_exporter": "python",
8072
"pygments_lexer": "ipython3",
81-
"version": "3.9.7"
73+
"version": "3.10.4"
74+
},
75+
"widgets": {
76+
"application/vnd.jupyter.widget-state+json": {
77+
"state": {},
78+
"version_major": 2,
79+
"version_minor": 0
80+
}
8281
}
8382
},
8483
"nbformat": 4,

ui-tests/notebooks/FullScreenControl.ipynb

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,13 @@
99
"source": [
1010
"from ipyleaflet import Map, FullScreenControl\n",
1111
"\n",
12-
"m = Map(zoom=5, center=[51.64, -76.52])\n",
12+
"center = [48.265643898808236, 336.7529296875]\n",
13+
"\n",
14+
"m = Map(center=center, zoom=7)\n",
1315
"m.add_control(FullScreenControl())\n",
1416
"\n",
1517
"m"
1618
]
17-
},
18-
{
19-
"cell_type": "code",
20-
"execution_count": null,
21-
"id": "9df299bf-0646-482d-abb0-6dcca8edbf0e",
22-
"metadata": {},
23-
"outputs": [],
24-
"source": []
2519
}
2620
],
2721
"metadata": {
@@ -40,7 +34,14 @@
4034
"name": "python",
4135
"nbconvert_exporter": "python",
4236
"pygments_lexer": "ipython3",
43-
"version": "3.9.7"
37+
"version": "3.10.4"
38+
},
39+
"widgets": {
40+
"application/vnd.jupyter.widget-state+json": {
41+
"state": {},
42+
"version_major": 2,
43+
"version_minor": 0
44+
}
4445
}
4546
},
4647
"nbformat": 4,

ui-tests/notebooks/Icon.ipynb

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,15 @@
99
"source": [
1010
"from ipyleaflet import Marker, Icon, Map\n",
1111
"\n",
12-
"center = (52.204793, 360.121558)\n",
12+
"center = [48.265643898808236, 336.7529296875]\n",
1313
"\n",
14-
"m = Map(center=center, zoom=10)\n",
15-
"icon = Icon(icon_url='https://leafletjs.com/examples/custom-icons/leaf-green.png', icon_size=[38, 95], icon_anchor=[22,94])\n",
16-
"mark = Marker(location=center, icon=icon, rotation_angle=90, rotation_origin='22px 94px')\n",
14+
"m = Map(center=center, zoom=7)\n",
15+
"icon = Icon(icon_url='https://raw.githubusercontent.com/Leaflet/Leaflet/main/docs/SlavaUkraini/examples/geojson/baseball-marker.png', icon_size=[38, 38], icon_anchor=[22, 94])\n",
16+
"mark = Marker(location=center, icon=icon, rotation_angle=10, rotation_origin='22px 94px')\n",
1717
"m.add_layer(mark);\n",
1818
"\n",
1919
"m"
2020
]
21-
},
22-
{
23-
"cell_type": "code",
24-
"execution_count": null,
25-
"id": "e977a7cf-4836-4c03-84fb-756bd090a4e3",
26-
"metadata": {},
27-
"outputs": [],
28-
"source": []
2921
}
3022
],
3123
"metadata": {
@@ -44,7 +36,14 @@
4436
"name": "python",
4537
"nbconvert_exporter": "python",
4638
"pygments_lexer": "ipython3",
47-
"version": "3.9.7"
39+
"version": "3.10.4"
40+
},
41+
"widgets": {
42+
"application/vnd.jupyter.widget-state+json": {
43+
"state": {},
44+
"version_major": 2,
45+
"version_minor": 0
46+
}
4847
}
4948
},
5049
"nbformat": 4,

ui-tests/notebooks/LayersControl.ipynb

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
"source": [
1010
"from ipyleaflet import Map, Marker, LayersControl\n",
1111
"\n",
12-
"m = Map(center=(50, 0), zoom=5)\n",
12+
"center = [48.265643898808236, 336.7529296875]\n",
1313
"\n",
14-
"marker1 = Marker(name='marker1', location=(48, -2))\n",
15-
"marker2 = Marker(name='marker2', location=(50, 0))\n",
16-
"marker3 = Marker(name='marker3', location=(52, 2))\n",
14+
"m = Map(center=center, zoom=7)\n",
15+
"\n",
16+
"marker1 = Marker(name='marker1', location=[48.265643898808236, 337.7529296875])\n",
17+
"marker2 = Marker(name='marker2', location=[48.265643898808236, 338.7529296875])\n",
18+
"marker3 = Marker(name='marker3', location=[48.265643898808236, 339.7529296875])\n",
1719
"m.add_layer(marker1)\n",
1820
"m.add_layer(marker2)\n",
1921
"m.add_layer(marker3)\n",
@@ -23,14 +25,6 @@
2325
"\n",
2426
"m"
2527
]
26-
},
27-
{
28-
"cell_type": "code",
29-
"execution_count": null,
30-
"id": "4a7a08dc-1cdb-4b52-b38f-6370aa07e2f9",
31-
"metadata": {},
32-
"outputs": [],
33-
"source": []
3428
}
3529
],
3630
"metadata": {
@@ -49,7 +43,14 @@
4943
"name": "python",
5044
"nbconvert_exporter": "python",
5145
"pygments_lexer": "ipython3",
52-
"version": "3.9.7"
46+
"version": "3.10.4"
47+
},
48+
"widgets": {
49+
"application/vnd.jupyter.widget-state+json": {
50+
"state": {},
51+
"version_major": 2,
52+
"version_minor": 0
53+
}
5354
}
5455
},
5556
"nbformat": 4,

ui-tests/notebooks/LegendControl.ipynb

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,15 @@
99
"source": [
1010
"from ipyleaflet import Map, LegendControl\n",
1111
"\n",
12-
"m = Map(center=(-10,-45), zoom=4)\n",
12+
"center = [48.265643898808236, 336.7529296875]\n",
13+
"\n",
14+
"m = Map(center=center, zoom=7)\n",
1315
"\n",
1416
"legend = LegendControl({\"low\":\"#FAA\", \"medium\":\"#A55\", \"High\":\"#500\"}, name=\"Legend\", position=\"bottomright\")\n",
1517
"m.add_control(legend)\n",
1618
"\n",
1719
"m"
1820
]
19-
},
20-
{
21-
"cell_type": "code",
22-
"execution_count": null,
23-
"id": "d82060ab-1340-4fba-a70c-57c2c2bcc766",
24-
"metadata": {},
25-
"outputs": [],
26-
"source": []
2721
}
2822
],
2923
"metadata": {
@@ -42,7 +36,14 @@
4236
"name": "python",
4337
"nbconvert_exporter": "python",
4438
"pygments_lexer": "ipython3",
45-
"version": "3.9.7"
39+
"version": "3.10.4"
40+
},
41+
"widgets": {
42+
"application/vnd.jupyter.widget-state+json": {
43+
"state": {},
44+
"version_major": 2,
45+
"version_minor": 0
46+
}
4647
}
4748
},
4849
"nbformat": 4,

ui-tests/notebooks/MagnifyingGlass.ipynb

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
"outputs": [],
99
"source": [
1010
"from ipyleaflet import Map, MagnifyingGlass, basemaps, basemap_to_tiles\n",
11-
"m = Map(center=(0, 0), zoom=2)\n",
11+
"\n",
12+
"center = [48.265643898808236, 336.7529296875]\n",
13+
"\n",
14+
"m = Map(center=center, zoom=7)\n",
1215
"\n",
1316
"topo_layer = basemap_to_tiles(basemaps.OpenTopoMap)\n",
1417
"magnifying_glass = MagnifyingGlass(layers=[topo_layer])\n",
@@ -17,14 +20,6 @@
1720
"\n",
1821
"m"
1922
]
20-
},
21-
{
22-
"cell_type": "code",
23-
"execution_count": null,
24-
"id": "a2222334-86e6-4d1c-9265-8d10b17b15df",
25-
"metadata": {},
26-
"outputs": [],
27-
"source": []
2823
}
2924
],
3025
"metadata": {
@@ -43,7 +38,14 @@
4338
"name": "python",
4439
"nbconvert_exporter": "python",
4540
"pygments_lexer": "ipython3",
46-
"version": "3.9.7"
41+
"version": "3.10.4"
42+
},
43+
"widgets": {
44+
"application/vnd.jupyter.widget-state+json": {
45+
"state": {},
46+
"version_major": 2,
47+
"version_minor": 0
48+
}
4749
}
4850
},
4951
"nbformat": 4,

ui-tests/notebooks/Marker.ipynb

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,17 @@
99
"source": [
1010
"from ipyleaflet import Map, Marker\n",
1111
"\n",
12-
"center = (52.204793, 360.121558)\n",
12+
"center = [48.265643898808236, 336.7529296875]\n",
1313
"\n",
14-
"m = Map(center=center, zoom=15)\n",
14+
"m = Map(center=center, zoom=7)\n",
1515
"\n",
1616
"marker = Marker(location=center, draggable=True)\n",
1717
"m.add_layer(marker);\n",
1818
"\n",
1919
"display(m)\n",
2020
"\n",
21-
"# Now that the marker is on the Map, you can drag it with your mouse,\n",
22-
"# it will automatically update the `marker.location` attribute in Python\n",
23-
"\n",
24-
"# You can also update the marker location from Python, that will update the\n",
25-
"# marker location on the Map:\n",
26-
"marker.location = (50, 356)"
21+
"marker.location = [48.265643898808236, 336.7529296875]"
2722
]
28-
},
29-
{
30-
"cell_type": "code",
31-
"execution_count": null,
32-
"id": "56216d6d-c1c5-4079-8822-2386375d0ed2",
33-
"metadata": {},
34-
"outputs": [],
35-
"source": []
3623
}
3724
],
3825
"metadata": {
@@ -51,7 +38,14 @@
5138
"name": "python",
5239
"nbconvert_exporter": "python",
5340
"pygments_lexer": "ipython3",
54-
"version": "3.9.7"
41+
"version": "3.10.4"
42+
},
43+
"widgets": {
44+
"application/vnd.jupyter.widget-state+json": {
45+
"state": {},
46+
"version_major": 2,
47+
"version_minor": 0
48+
}
5549
}
5650
},
5751
"nbformat": 4,

0 commit comments

Comments
 (0)