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

Embedding a large amount of popupImages in a map #168

Closed
adrfantini opened this issue Jul 31, 2018 · 3 comments
Closed

Embedding a large amount of popupImages in a map #168

adrfantini opened this issue Jul 31, 2018 · 3 comments

Comments

@adrfantini
Copy link

I have a map which contains several thousands points, each of which should have a different popup image which is a local .png. Currently the generation of the map is extremely slow, to the point I kill it after a couple of hours.

Is mapview making a copy of all the images and loading all of them, or is it somehow possible to make it so they are loaded only upon request?

@tim-salabim
Copy link
Member

We've changed the way local image files are embedded a couple of months ago. Previously, the (e.g.) pngs were copied to a temp folder and then <src=...>'d, now they are embedded via base64enc::base64encode. The previous solution should be a lot faster and performant. We made the change because when savong the map via saveWidget/mapshot the images were lost as they were not saved in the correct place.

Maybe we should provide the user with a choice to embed them, but have the sourced pngs as a default? This is a bit of a conundrum as we then again loose the ability to save the images in a straght forward manner... To get them to the correct place the user needs to copy the folder containing the pngs to one level above the index.html file. It is ia mess...

Any thoughts?

@adrfantini
Copy link
Author

I am all for more options, with sensible defaults, as long as they are properly documented.

@tim-salabim
Copy link
Member

Please let me know if the commit fixes your issue.

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

No branches or pull requests

2 participants