法典:
import folium
map = folium.Map(location=[38.58, -99.09],zoom_start=6, tiles="Stamen Terrain")
map.save("Map1.html")
错误:
File "C:UsersKoku LwangaPycharmProjectswebmapmap1.py", line 2, in <module>
map = folium.Map(location=[38.58, -99.09],zoom_start=6, tiles="Stamen Terrain")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:UsersKoku LwangaPycharmProjectswebmapvenvLibsite-packagesfoliumfolium.py", line 303, in __init__
tile_layer = TileLayer(
^^^^^^^^^^
File "C:UsersKoku LwangaPycharmProjectswebmapvenvLibsite-packagesfolium
aster_layers.py", line 145, in __init__
raise ValueError("Custom tiles must have an attribution.")
ValueError: Custom tiles must have an attribution.
我试图用手法在地图上添加点,但并非奏效。