ipyleafletmappingLab7
In [1]:
Copied!
#! pip install fakemap
#! pip install fakemap
In [2]:
Copied!
import fakemap
import fakemap
In [3]:
Copied!
m=fakemap.Map(center = [20,-40], zoom=2)
m=fakemap.Map(center = [20,-40], zoom=2)
In [4]:
Copied!
# import any basemap from xyz services or URL
m.add_basemap('Esri.WorldImagery')
# import any basemap from xyz services or URL
m.add_basemap('Esri.WorldImagery')
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[4], line 2 1 # import any basemap from xyz services or URL ----> 2 m.add_basemap('Esri.WorldImagery') AttributeError: 'Map' object has no attribute 'add_basemap'
In [5]:
Copied!
# add any geojson
m.add_geojson('Sample/map.geojson')
# add any geojson
m.add_geojson('Sample/map.geojson')
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[5], line 2 1 # add any geojson ----> 2 m.add_geojson('Sample/map.geojson') AttributeError: 'Map' object has no attribute 'add_geojson'
In [6]:
Copied!
#add any shapefile from local or URL
m.add_shp('Sample/counties.zip')
#add any shapefile from local or URL
m.add_shp('Sample/counties.zip')
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[6], line 2 1 #add any shapefile from local or URL ----> 2 m.add_shp('Sample/counties.zip') AttributeError: 'Map' object has no attribute 'add_shp'
In [7]:
Copied!
#add any kind of vector data
m.add_vector('https://stacks.stanford.edu/file/druid:wb529sv5690/data.zip')
#add any kind of vector data
m.add_vector('https://stacks.stanford.edu/file/druid:wb529sv5690/data.zip')
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[7], line 2 1 #add any kind of vector data ----> 2 m.add_vector('https://stacks.stanford.edu/file/druid:wb529sv5690/data.zip') AttributeError: 'Map' object has no attribute 'add_vector'
In [8]:
Copied!
m
m
Out[8]:
Last update:
2023-05-11