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

Question: large dataset loading. #48

Closed
osteth opened this issue May 3, 2017 · 5 comments
Closed

Question: large dataset loading. #48

osteth opened this issue May 3, 2017 · 5 comments
Labels

Comments

@osteth
Copy link

osteth commented May 3, 2017

Hey!
I am using Flask-googleMaps for a NASA Space Apps Challenge and its been working great so far, thanks for making it! I have hit one issue I was hoping to pick your mind about and see if you have a solution.

I am tring to render over 20k +/- circles on the map to show wildfires detected by satellite. I believe I implemented FGM properly but it takes forever to load. I think this is because of the very large dataset I am loading.

Do you have any ideas for ways that I can either stream the circles in over time or something else that will work to load them?

@rochacbruno
Copy link
Member

@osteth for that case I think you can generate an empty map, or with some initial circles, and then take the map object n JavaScript and a JS loop (or other technique like ws atc..) and then load maps asynchronously few at a time.

Unfortunately FGM does not have that kind of solution in Python Backend.

@osteth
Copy link
Author

osteth commented May 4, 2017

Thank you much for your time, that helps a lot!

@osteth osteth closed this as completed May 4, 2017
@osteth
Copy link
Author

osteth commented May 6, 2017

I went ahead an used GeoIP to get the users coordinates and then filtered the data down using a bounding box to only show points relevant to each specific user. using FGM for the NASA Space apps challenge. thanks making it much easier for me to integrate a map into my project.
can check it out if you like.
https://github.com/osteth/project-firewatch

@rochacbruno
Copy link
Member

@osteth nice! I'll take a look!

TIP: dont publish your private API keys to github, read it from environment variable os.environ.get("GOOGLEMAPS_KEY")

@osteth
Copy link
Author

osteth commented May 11, 2017

Thanks for the tip!
I had to provide a working copy of the source submitted via git per the submission requirements for the local contest and couldn't figure out a way to deliver a working copy without publishing the key, but I will definitely be revoking that key and editing it to use environment variables once judging is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants