flask-extensions / Flask-GoogleMaps

Easy way to add GoogleMaps to Flask applications. maintainer: @getcake
https://flask-googlemaps.com
MIT License
647 stars 196 forks source link

Infobox: Only accepting single item from list. #21

Closed lwgray closed 8 years ago

lwgray commented 8 years ago

See my code from views.py

@app.route('/')
@app.route('/index', methods=['GET', 'POST'])
@login_required
def index():
    coords = pickle.load(open("coordinates.p", "rb"))
    addresses = pickle.load(open("addresses.p", "rb"))
    mymap = Map(
        identifier="view-side",
        style="height:100%; width:100%; left:0; position:absolute;z-index:200;",
        lat=coords[0][0],
        lng=coords[0][1],
        zoom='5',
        infobox=addresses,  # does not work, but if I change it to addresses[0] it works with out issue
        markers=coords
    )
    return render_template('index.html', mymap=mymap)
rochacbruno commented 8 years ago

fixed now in 0.2.0, different way to define infoboxes