Skip to content

[heatmap] Optionally use map as background #10

Open
@laufhannes

Description

@laufhannes

Depending on the heatmap's size, it may be nice to see at least some basic map in the background.

I have a first working solution with laufhannes@ebb0823 and laufhannes/staticmaplite@3758e11, but that's not perfect. The main part within this repo is to calculate lat/lng bounds of the visible part. Afterwards, a static map is requested, saved locally and inserted. (Without saving it locally, inkscape is not able to embed the image when converting to png)

The staticmaplite repo is written in php, but it should be possible to transform it into python. Using Google Maps Static may even be better (but requires an API key; in general free for non-commercial and low traffic apps), as it's possible to individually style the map. I created one first try for such a style at snazzy maps.

If using Google Maps, calculation of the required zoom level and cropping the image (or calculating the exact size) has to be done within this repo.


As this testing has been done in my local runalyze-environment, the example is decorated with our brandings ;)

laufhannes-heatmap-alltime-test-carto-dark

And I guess this needs some additional padding within the draw area to not let tracks touch the border.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions