Test4
In [1]:
Copied!
import folium
import folium
In [2]:
Copied!
m = folium.Map(location=[48, -100], zoom_start=4)
m
m = folium.Map(location=[48, -100], zoom_start=4)
m
Out[2]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [3]:
Copied!
import rasterarea.folium as rasterarea
import rasterarea.folium as rasterarea
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) Cell In[3], line 1 ----> 1 import rasterarea.folium as rasterarea ModuleNotFoundError: No module named 'rasterarea.folium'
In [4]:
Copied!
m =rasterarea.Map(location=[48, -100], zoom_start=4)
m.add_tile_layer()
m
m =rasterarea.Map(location=[48, -100], zoom_start=4)
m.add_tile_layer()
m
--------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[4], line 1 ----> 1 m =rasterarea.Map(location=[48, -100], zoom_start=4) 2 m.add_tile_layer() 3 m NameError: name 'rasterarea' is not defined
In [5]:
Copied!
import leafmap
url = 'http://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}'
import leafmap
url = 'http://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}'
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) Cell In[5], line 1 ----> 1 import leafmap 2 url = 'http://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}' ModuleNotFoundError: No module named 'leafmap'
In [6]:
Copied!
m = leafmap.Map()
m.add_tile_layer(url=url, name = 'basemap',attribution='Google')
m
m = leafmap.Map()
m.add_tile_layer(url=url, name = 'basemap',attribution='Google')
m
--------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[6], line 1 ----> 1 m = leafmap.Map() 2 m.add_tile_layer(url=url, name = 'basemap',attribution='Google') 3 m NameError: name 'leafmap' is not defined
In [7]:
Copied!
m.layers[1].interact()
m.layers[1].interact()
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[7], line 1 ----> 1 m.layers[1].interact() AttributeError: 'Map' object has no attribute 'layers'
In [8]:
Copied!
from ipyleaflet import WidgetControl
import ipywidgets as widgets
from ipyleaflet import WidgetControl
import ipywidgets as widgets
In [9]:
Copied!
slider = widgets.FloatSlider(min=0,max=1,value=0.1)
slider
slider = widgets.FloatSlider(min=0,max=1,value=0.1)
slider
Out[9]:
In [10]:
Copied!
widgets.jslink((m.layers[1], 'opacity'), (slider, 'value'))
widgets.jslink((m.layers[1], 'opacity'), (slider, 'value'))
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[10], line 1 ----> 1 widgets.jslink((m.layers[1], 'opacity'), (slider, 'value')) AttributeError: 'Map' object has no attribute 'layers'
In [11]:
Copied!
contral = WidgetControl(widget=slider, position='bottomright')
contral = WidgetControl(widget=slider, position='bottomright')
In [12]:
Copied!
m.add(contral)
m.add(contral)
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[12], line 1 ----> 1 m.add(contral) AttributeError: 'Map' object has no attribute 'add'
In [13]:
Copied!
import geosdemo
import ipyleaflet
import geosdemo
import ipyleaflet
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) Cell In[13], line 1 ----> 1 import geosdemo 2 import ipyleaflet ModuleNotFoundError: No module named 'geosdemo'
In [14]:
Copied!
wiget = widgets.HTML(value = 'https://static.wikia.nocookie.net/familyguyfanon/images/8/88/Chip_Griffin_1.png/revision/latest/scale-to-width-down/1000?cb=20211116205910')
wiget
wiget = widgets.HTML(value = 'https://static.wikia.nocookie.net/familyguyfanon/images/8/88/Chip_Griffin_1.png/revision/latest/scale-to-width-down/1000?cb=20211116205910')
wiget
Out[14]:
In [15]:
Copied!
m = ipyleaflet.Map( center=(0, 0), zoom=2)
m
m = ipyleaflet.Map( center=(0, 0), zoom=2)
m
--------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[15], line 1 ----> 1 m = ipyleaflet.Map( center=(0, 0), zoom=2) 2 m NameError: name 'ipyleaflet' is not defined
In [16]:
Copied!
html = """
<html>
"""
html = """
"""
Last update:
2023-05-11