无法接受用户输入以添加标记

Unable to take user input to add the markers

在下面的代码中,我无法通过用户输入来添加纬度和经度标记。如果有人能帮助我解决这个问题,那将是很大的帮助

import pygmaps
mymap5 = pygmaps.maps(Lat, Long, Zoom)
a = float(input("Enter the lat of Person - 1 :"))
b = float(input("Enter the longitude Person - 1 :"))
mymap5.addpoint(a[0], b[0], "#ff0000", "Title")
mymap5.draw('pygmap.html')

您正在尝试为不支持的浮点数编制索引。尝试将以下内容放入您的解释器中:

a = float(input("Enter the lat of Person - 1 :"))
b = float(input("Enter the longitude Person - 1 :"))

print(a, b)

简而言之,您似乎只需要使用 ab 而不是 a[0]b[0]