python-visualization / python-visualization/folium

Blue Lines when using TimestampedGeoJson in Folium

Aperta
#1,945 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug
Lingua principale
Python
Stelle
7.4k
Fork
2.3k
Merge medio
17h 22m
PR unite (30g)
11

Descrizione

Describtion
During the animation with the TimestampedGeoJson plugin in Folium, blue lines briefly appear along the route of the objects, causing undesired strain on the hardware.

To Reproduce
You can use the txt file and safe it as HTML and open it in your browser. At the timespamps 08:50:54 and 08:28:50 you can see the blue lines.

Expected behavior
The blue lines should not appear during the animation and the hardware should not be strained.

Environment:

  • Browser: chrome
  • Python version: 3.10.13
  • folium version: 0.15.1

Additional context
To hide the lines, I replaced the following code in the HTML file (line 118):

style: function (feature) {
    return feature.properties.style;
}

with the code:

style: function (feature) {
    return {
        opacity: 0.0
    };
}

However, this does not reduce the hardware strain.

You can find an example Folium map animated_train_bug.txt (you can safe it as html and open it with chrome) and a video illustrating the issue attached (timestamp bug: 08:50:54 and 08:28:50).

Can you help making a fix for this issue please?

animated_train_bug.txt

Uploading animation_rando_blue_lines.mp4…

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con il file allegato animated_train_bug.txt, salvalo come HTML e ispeziona il codice TimestampedGeoJson generato intorno alla riga 118. Riproduci le linee blu in Chrome alle 08:50:54 e alle 08:28:50, quindi traccia il comportamento dell'animazione e dello stile. Il lavoro è completato quando le linee indesiderate non compaiono più e la sollecitazione hardware segnalata è ridotta.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, python
Ambito
data-visualization, frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.