How to Create InfoWindows for Multiple Markers in a For loop
I have the following code and it correctly creates all the markers that I am storing but then when I click on any of them only the last InfoWindow is created and it only appears over the last marker no matter which marker I click on. I would imagine this has something to so with the same variable being used in my for loop. {% for record in records %} //need to do the JSON encoding because JavaScript can't have Jinja2 variables //I need the safe here because Jinja2 tries to escape the characters otherwise var GPSlocation = {{record.GPSlocation|json_encode|safe}}; var LatLng = GPSlocation