Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blue Lines when using TimestampedGeoJson in Folium #1945

Open
EliStowi opened this issue May 3, 2024 · 2 comments
Open

Blue Lines when using TimestampedGeoJson in Folium #1945

EliStowi opened this issue May 3, 2024 · 2 comments
Labels
bug An issue describing unexpected or malicious behaviour

Comments

@EliStowi
Copy link

EliStowi commented May 3, 2024

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…

@Conengmo
Copy link
Member

Conengmo commented May 6, 2024

Can confirm the blue line showing up in Edge in that file you provided.

Not sure what the issue is, and don't really have time to look into this.

Maybe as a work around you can add an explicit opacity 0 style to the geojson?

@Conengmo Conengmo added the bug An issue describing unexpected or malicious behaviour label May 6, 2024
@EliStowi EliStowi closed this as completed May 6, 2024
@EliStowi EliStowi reopened this May 6, 2024
@EliStowi
Copy link
Author

EliStowi commented May 6, 2024

Thank you for your reply @Conengmo .
We have already adjusted the opacity.
It would be ideal if the lines were to disappear completely in order to reduce the load on the hardware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue describing unexpected or malicious behaviour
Projects
None yet
Development

No branches or pull requests

2 participants