显示语法错误的解决方案是什么?
What is the solution for the syntax error being displayed?
代码如下:
import folium
map = folium.Map(location=[12.9716,77.5946], zoom_start=1, tiles="Stamen Terrain"
#map.add_child(folium.Marker(location=[12.8,77.2], popup="Hi I am a Marker" , icon=folium.Icon(color='green')))
#map.save("map1.html")
fg1=folium.FeatureGroup(name="My Map")
fg1.add_child(folium.Marker(location = [38.2,-100.1], popup = "Hey", icon = folium.Icon_color(color='green')))
map.add_child(fg1)
map.save("Map1.html")
下面是我得到的错误的堆栈跟踪:
File "map1.py", line 8
fg1=folium.FeatureGroup(name="My Map")
^
SyntaxError: invalid syntax
您在行中缺少右括号
folium.Map(location=[12.9716,77.5946], zoom_start=1, tiles="Stamen Terrain"
代码如下:
import folium
map = folium.Map(location=[12.9716,77.5946], zoom_start=1, tiles="Stamen Terrain"
#map.add_child(folium.Marker(location=[12.8,77.2], popup="Hi I am a Marker" , icon=folium.Icon(color='green')))
#map.save("map1.html")
fg1=folium.FeatureGroup(name="My Map")
fg1.add_child(folium.Marker(location = [38.2,-100.1], popup = "Hey", icon = folium.Icon_color(color='green')))
map.add_child(fg1)
map.save("Map1.html")
下面是我得到的错误的堆栈跟踪:
File "map1.py", line 8
fg1=folium.FeatureGroup(name="My Map")
^
SyntaxError: invalid syntax
您在行中缺少右括号
folium.Map(location=[12.9716,77.5946], zoom_start=1, tiles="Stamen Terrain"