Closed ai-abdellah closed 6 years ago
Any help please ?
This should work
markers=[
{
'icon': 'static/img/icons/home1.png',
'title': 'Adresse Home',
'lat': user.latitude,
'lng': user.longitude,
'infobox': "<h3>{user.first_name}</h3><img src='{user.image}'>".format(user=user)
}for user in users:],
hello Bruno, thank you for your answer, I tested the code but it gives me the error
raise AttributeError ('lat and lng required') AttributeError: lat and lng required
do you have any suggestion please thank you very much
Your user.latitude must be empty, is that populated in the db?
the latitude and longitude fields are not empty in DB.
This error is thown only if lat and lng is None https://github.com/rochacbruno/Flask-GoogleMaps/blob/master/flask_googlemaps/__init__.py#L116
actually, i checked in the DB and i found a line that contains empty value, i fixed the values and it works. thanks a lot
@ai-abdellah Hi are you saving base64 encoded images in the MySQL database? Just curious why you can directly use "user.image" in "".
Hello how can i inject data from mysql to maps, i use this code but its not working:
Can you help me please. Thank you