Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 22, 2024
1 parent ada7767 commit f9500a7
Showing 1 changed file with 28 additions and 44 deletions.
72 changes: 28 additions & 44 deletions docs/maplibre/jump_to.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -44,7 +44,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -53,7 +53,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -63,60 +63,44 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ee0a056bb87b47d4a61310d14a64e251",
"version_major": 2,
"version_minor": 1
},
"text/plain": [
"Map(height='600px', map_options={'bearing': 0.0, 'center': (100.507, 13.745), 'pitch': 0.0, 'style': 'https://…"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"m = leafmap.Map(center=[100.507, 13.745], zoom=9, style=style)\n",
"\n",
"cities = {\n",
" 'type': 'FeatureCollection',\n",
" 'features': [\n",
" \"type\": \"FeatureCollection\",\n",
" \"features\": [\n",
" {\n",
" 'type': 'Feature',\n",
" 'properties': {},\n",
" 'geometry': {'type': 'Point', 'coordinates': [100.507, 13.745]},\n",
" \"type\": \"Feature\",\n",
" \"properties\": {},\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [100.507, 13.745]},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'properties': {},\n",
" 'geometry': {'type': 'Point', 'coordinates': [98.993, 18.793]},\n",
" \"type\": \"Feature\",\n",
" \"properties\": {},\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [98.993, 18.793]},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'properties': {},\n",
" 'geometry': {'type': 'Point', 'coordinates': [99.838, 19.924]},\n",
" \"type\": \"Feature\",\n",
" \"properties\": {},\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [99.838, 19.924]},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'properties': {},\n",
" 'geometry': {'type': 'Point', 'coordinates': [102.812, 17.408]},\n",
" \"type\": \"Feature\",\n",
" \"properties\": {},\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [102.812, 17.408]},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'properties': {},\n",
" 'geometry': {'type': 'Point', 'coordinates': [100.458, 7.001]},\n",
" \"type\": \"Feature\",\n",
" \"properties\": {},\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [100.458, 7.001]},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'properties': {},\n",
" 'geometry': {'type': 'Point', 'coordinates': [100.905, 12.935]},\n",
" \"type\": \"Feature\",\n",
" \"properties\": {},\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [100.905, 12.935]},\n",
" },\n",
" ],\n",
"}\n",
Expand All @@ -129,10 +113,10 @@
"metadata": {},
"outputs": [],
"source": [
"for index, city in enumerate(cities['features']):\n",
"for index, city in enumerate(cities[\"features\"]):\n",
" time.sleep(2)\n",
" coords = city['geometry']['coordinates']\n",
" m.jump_to({'center': coords})"
" coords = city[\"geometry\"][\"coordinates\"]\n",
" m.jump_to({\"center\": coords})"
]
},
{
Expand Down

0 comments on commit f9500a7

Please sign in to comment.