def coordinates(street, city):
geo = Nominatim()
geocords = geo.geocode(street + ' ' + city)
if geocords:
emit('coordinates', (geocords.latitude, geocords.longitude))
else:
emit("warning", "Coordinated no found", namespace='/general')
return True
评论列表
文章目录