Skip to content

Commit

Permalink
Update Mapillary notebook example
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Jan 28, 2025
1 parent 8f4efd9 commit 1278667
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/maplibre/mapillary.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"outputs": [],
"source": [
"m = leafmap.Map(style=\"bright\", center=[-73.99941, 40.71194], zoom=13)\n",
"m.add_basemap(\"Satellite\")\n",
"m.add_mapillary(minzoom=6, maxzoom=14, add_popup=True)\n",
"m.add_layer_control()\n",
"m"
Expand Down Expand Up @@ -126,6 +127,27 @@
"source": [
"common.get_mapillary_image_widget(image_ids[0], style=\"photo\", width=1000)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map(style=\"bright\", center=[-73.99941, 40.71194], zoom=13)\n",
"m.add_basemap(\"Satellite\")\n",
"m.add_mapillary(minzoom=6, maxzoom=14, add_popup=True)\n",
"m.add_layer_control()\n",
"widget = m.create_mapillary_widget(style=\"photo\", width=500)\n",
"widget"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![image](https://github.com/user-attachments/assets/a67a44ba-b15c-4916-9d88-14a744645364)"
]
}
],
"metadata": {
Expand Down
2 changes: 2 additions & 0 deletions leafmap/maplibregl.py
Original file line number Diff line number Diff line change
Expand Up @@ -4098,6 +4098,8 @@ def log_lng_lat(lng_lat):
</iframe>
"""
widget.value = content
else:
widget.value = "No Mapillary image found."

self.observe(log_lng_lat, names="clicked")

Expand Down

0 comments on commit 1278667

Please sign in to comment.