Foliumap
Week 12
In [1]:
Copied!
#now immporting our adapted folium module from geosdemo folder (foliumap --> name for the module)
import geosdemo.foliumap as geosdemo
#now immporting our adapted folium module from geosdemo folder (foliumap --> name for the module)
import geosdemo.foliumap as geosdemo
In [2]:
Copied!
m = geosdemo.Map(location = [40.7128, -74.0060], zoom_start=12)
#bnotice that differntly to ipyleaft there is only zoom and zoom out no other thing
m = geosdemo.Map(location = [40.7128, -74.0060], zoom_start=12)
#bnotice that differntly to ipyleaft there is only zoom and zoom out no other thing
In [3]:
Copied!
#using the add_tile_layer
url = 'http://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}'
#using the add_tile_layer
url = 'http://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}'
In [4]:
Copied!
m.add_tile_layer(url=url, name="Satellite", attribution="google")
m.add_tile_layer(url=url, name="Satellite", attribution="google")
In [5]:
Copied!
m #differnly to ypileaf we need to add the map at the end
m #differnly to ypileaf we need to add the map at the end
Out[5]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [6]:
Copied!
import folium
m = folium.Map(location=[40, -100], zoom_start=4)
m
m = folium.Map(location=[45.372, -121.6972], zoom_start=12, tiles="Stamen Terrain")
tooltip = "Click me!"
folium.Marker(
[45.3288, -121.6625], popup="<i>Mt. Hood Meadows</i>", tooltip=tooltip
).add_to(m)
folium.Marker(
[45.3311, -121.7113], popup="<b>Timberline Lodge</b>", tooltip=tooltip
).add_to(m)
m
import folium
m = folium.Map(location=[40, -100], zoom_start=4)
m
m = folium.Map(location=[45.372, -121.6972], zoom_start=12, tiles="Stamen Terrain")
tooltip = "Click me!"
folium.Marker(
[45.3288, -121.6625], popup="Mt. Hood Meadows", tooltip=tooltip
).add_to(m)
folium.Marker(
[45.3311, -121.7113], popup="Timberline Lodge", tooltip=tooltip
).add_to(m)
m
Out[6]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [ ]:
Copied!
Last update:
2023-05-11