by Guest » 31 Dec 2024, 15:55
Ich erstelle eine Web-App mit Django und Folium. Ich habe eine Navigationsleiste und eine Folium-Karte auf der Webseite. Es funktioniert gut auf Computern und Geräten mit Querformat-Bildschirm, aber auf Geräten mit Hochformat-Bildschirm hat die Karte einen freien Platz.
Mein Code für die Karte:
Code: Select all
current_map = folium.Map(location=start_location, zoom_start=6)
fig = branca.element.Figure(height="100%")
fig.add_child(current_map)
context = {"current_map": current_map._repr_html_()}
return render(request, template_name="index.html", context=context)
index.html
Wie fülle ich es aus?
[img]
https://i.sstatic.net /S8WAv.jpg[/img]
Ich erstelle eine Web-App mit Django und Folium. Ich habe eine Navigationsleiste und eine Folium-Karte auf der Webseite. Es funktioniert gut auf Computern und Geräten mit Querformat-Bildschirm, aber auf Geräten mit Hochformat-Bildschirm hat die Karte einen freien Platz.
Mein Code für die Karte:
[code]current_map = folium.Map(location=start_location, zoom_start=6)
fig = branca.element.Figure(height="100%")
fig.add_child(current_map)
context = {"current_map": current_map._repr_html_()}
return render(request, template_name="index.html", context=context)
[/code]
index.html
[code]
{{ current_map | safe }}
[/code]
Wie fülle ich es aus?
[img]https://i.sstatic.net /S8WAv.jpg[/img]