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 19, 2024
1 parent e4178be commit 9d6276d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 39 deletions.
46 changes: 15 additions & 31 deletions docs/maplibre/vector_tile.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -26,7 +26,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -43,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -52,7 +52,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -62,40 +62,24 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "29d4ee4e6b0e4efd82d544f41900f307",
"version_major": 2,
"version_minor": 1
},
"text/plain": [
"Map(height='600px', map_options={'bearing': 0.0, 'center': (-122.447303, 37.753574), 'pitch': 0.0, 'style': 'h…"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"m = leafmap.Map(center=[37.753574, -122.447303], zoom=13, style=style)\n",
"source = {\n",
" 'type': 'vector',\n",
" 'url': f'https://api.maptiler.com/tiles/contours/tiles.json?key={MAPTILER_KEY}',\n",
" \"type\": \"vector\",\n",
" \"url\": f\"https://api.maptiler.com/tiles/contours/tiles.json?key={MAPTILER_KEY}\",\n",
"}\n",
"layer = {\n",
" 'id': 'terrain-data',\n",
" 'type': 'line',\n",
" 'source': 'contours',\n",
" 'source-layer': 'contour',\n",
" 'layout': {'line-join': 'round', 'line-cap': 'round'},\n",
" 'paint': {'line-color': '#ff69b4', 'line-width': 1},\n",
" \"id\": \"terrain-data\",\n",
" \"type\": \"line\",\n",
" \"source\": \"contours\",\n",
" \"source-layer\": \"contour\",\n",
" \"layout\": {\"line-join\": \"round\", \"line-cap\": \"round\"},\n",
" \"paint\": {\"line-color\": \"#ff69b4\", \"line-width\": 1},\n",
"}\n",
"m.add_source('contours', source)\n",
"m.add_source(\"contours\", source)\n",
"m.add_layer(layer)\n",
"m"
]
Expand Down
16 changes: 8 additions & 8 deletions docs/maplibre/wms_source.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@
"m = leafmap.Map(center=[40.6892, -74.5447], zoom=8, style=style)\n",
"\n",
"source = {\n",
" 'type': 'raster',\n",
" 'tiles': [\n",
" 'https://img.nj.gov/imagerywms/Natural2015?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&transparent=true&width=256&height=256&layers=Natural2015'\n",
" \"type\": \"raster\",\n",
" \"tiles\": [\n",
" \"https://img.nj.gov/imagerywms/Natural2015?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&transparent=true&width=256&height=256&layers=Natural2015\"\n",
" ],\n",
" 'tileSize': 256,\n",
" \"tileSize\": 256,\n",
"}\n",
"layer = {\n",
" 'id': 'wms-test-layer',\n",
" 'type': 'raster',\n",
" 'source': 'wms-test-source',\n",
" 'paint': {},\n",
" \"id\": \"wms-test-layer\",\n",
" \"type\": \"raster\",\n",
" \"source\": \"wms-test-source\",\n",
" \"paint\": {},\n",
"}\n",
"m.add_source(\"wms-test-source\", source)\n",
"m.add_layer(layer, before_id=\"aeroway_fill\")\n",
Expand Down

0 comments on commit 9d6276d

Please sign in to comment.