Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Map output from OSM returns blocked tiles, due to defective request or not following referer-policy

Offen
#2,236 5 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
python

Rechercherichtung

Reproduzieren Sie das Problem mit dem bereitgestellten Folium-Beispiel und untersuchen Sie die Kachel-Anfragen des Browsers sowie die standardmäßige OSM-Kachelkonfiguration. Ermitteln Sie, wo die Anfrage-Richtlinie definiert ist, und überprüfen Sie die Behebung, indem Sie bestätigen, dass die generierte interaktive Karte Kacheln ohne 403-Warnungen lädt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Bug description
I am plotting a data set to be projected on a map, using Folium. However, the default OSM representation doesn't work properly.

The map renders as this, displaying a lot of warnings on 403 errors:

Image

Reading the OSM wiki page about Blocked tiles, one might assume that Folium currently doesn't comply to OSM's policies?

To Reproduce
Code excerpt:

import folium

# convert to pandas dataframe
import pandas as pd
df = pd.DataFrame(folkegrupper, columns=["Historic name", "Modern name", "English name", "Area", "Longitude", "Latitude"])

# create map
m = folium.Map(location=[30, 70], zoom_start=3)

# add points to map
for index, row in df.iterrows():
    folium.CircleMarker(
        location=[row["Longitude"], row["Latitude"]],
        radius=15,
        color="blue",
        fill=True,
        fill_color="blue",
        fill_opacity=0.6,
        tooltip=f"Modern name: {row['Modern name']}",
        popup=f"Historic name: {row['Historic hame']}<br>Area: {row['Area']}"
    ).add_to(m)

# display map
m

Example data for testing code above (variable must be run before the code)

folkegrupper = [
    ("group1a", "group1b", "group1c", "Sør-Afrika", -30.0550, 23.6235),
    ("group2a", "group2b", "group2c", "Malaysia", 4.2105, 101.6864),
    ("group3a", "group3b", "group3c", "Nord-Russland", 59.4372, 105.3305),
    ("group4a", "group4b", "group4c", "Midtøsten", 27.2750, 49.8718),
    ("group5a", "group5b", "group5c", "India", 20.5937, 78.9629),
    ("group6a", "group6b", "group6c", "Verden", 0, 0),
    ("group7a", "group7b", "group7c", "Sør-Afrika", -25.7302, 28.2092)
]

Expected behavior
GIVEN valid code and a dataset with geodata,
WHEN the code is run,
THEN an interactive map should display without blocked tiles

Environment info

  • Browser: Firefox 151.0.3 (used to display html output)
  • Python version: 3.12.13
  • folium version: 0.20.0
Vorherrschende Sprache
Python
Sterne
7.4k
Forks
2.3k
Ø Merge
17 Std. 22 Min.
Gemergte PRs (30 T.)
11

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus python-visualization/folium

Alle Issues in python-visualization/folium

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.