New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infobox for multple icons #20
Comments
@rodrigorahal have you tried the idea described here: #16 ? |
@rochacbruno yes, I have. And it works perfectly for the case mentioned: one icon with multiple markers.
But in my case, I have multiples icons, each one, with one marker:
and my infobox looks like this: Looking at the source code, my results make sense. Maybe the infobox should also be a |
I'm facing the same problem.This is a rather concerning flaw. |
I want to fix this, but I need help, what is the best idea? Getting a dict in gmaps.infobox? |
The dict idea is the first that comes to mind. |
Fixed now in master, preparing to release 0.2.0, see example.py to get new way of defining infoboxes as dicts |
@rodrigorahal @AhanM done and released 0.2.0 I may use your help to improve and document features. Thanks |
thanks @rochacbruno! |
@rochacbruno I'd be more than happy to assist you. |
When you have multiple icons, you can't set different infoboxes for each icon.
In the
initialize_
function ingmapsj.html
, thegetInfoCallback({{gmap.varname}}, "{{gmap.infobox[loop.index0]|safe}}"))
is inside the markers[icon] loop:In the case where you have one marker per icon and a infobox list, you always get the first value of the list for every marker.
It's not clear to me what's the best way to add multiple infoboxes for multiple icons without breaking the multiple infoboxes for multiple markers with one icon. Maybe a flag
multipleiconflag
and a call togetInfoCallback
outside the marker loop?The text was updated successfully, but these errors were encountered: