erik / derive

Generate personal heatmap from GPX/TCX/FIT/IGC data
https://erik.github.io/derive
MIT License
484 stars 62 forks source link

Export as png x2 or more #70

Open maxime1992 opened 1 year ago

maxime1992 commented 1 year ago

It'd be really nice to be able to export the png in higher quality for example x2, x3 and x4.

Same picture, just better definition.

erik commented 1 year ago

Nice idea. Currently using https://github.com/mapbox/leaflet-image, which doesn't have a way to change the pixel ratio as far as I can tell (other than opening the map on a high DPI display?)

~Maybe could try scaling the canvas element that gets returned. That would make the raster tiles a bit blurry, but at least keep the track data sharp.~ The data would be rasterized before it's returned, so this wouldn't work.

I think you'd need to reimplement leaflet-image to get this to work. There are some other libraries to check out though