02 using basemaps
Uncomment the following line to install geemap if needed.
In [1]:
Copied!
# !pip install geemap
# !pip install geemap
In [2]:
Copied!
import geemap
import geemap
In [3]:
Copied!
geemap.show_youtube('6J5ZCIUPXfI')
geemap.show_youtube('6J5ZCIUPXfI')
In [4]:
Copied!
Map = geemap.Map(center=[40, -100], zoom=4)
Map
Map = geemap.Map(center=[40, -100], zoom=4)
Map
Out[4]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [5]:
Copied!
Map.add_basemap('HYBRID')
Map.add_basemap('HYBRID')
In [6]:
Copied!
naip_url = 'https://services.nationalmap.gov/arcgis/services/USGSNAIPImagery/ImageServer/WMSServer?'
Map.add_wms_layer(
url=naip_url, layers='0', name='NAIP Imagery', format='image/png', shown=True
)
naip_url = 'https://services.nationalmap.gov/arcgis/services/USGSNAIPImagery/ImageServer/WMSServer?'
Map.add_wms_layer(
url=naip_url, layers='0', name='NAIP Imagery', format='image/png', shown=True
)
In [7]:
Copied!
url = 'https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}'
Map.add_tile_layer(url, name='Google Map', attribution='Google')
url = 'https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}'
Map.add_tile_layer(url, name='Google Map', attribution='Google')
In [8]:
Copied!
m = geemap.Map()
m.basemap_demo()
m
m = geemap.Map()
m.basemap_demo()
m
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Input In [8], in <cell line: 2>() 1 m = geemap.Map() ----> 2 m.basemap_demo() 3 m AttributeError: 'Map' object has no attribute 'basemap_demo'
Last update:
2022-03-14