Hypfer / lovelace-valetudo-map-card

Display the map from a valetudo-enabled robot in a home assistant dashboard card.
MIT License
243 stars 36 forks source link

Auto center map #121

Open LeChuck2909 opened 2 years ago

LeChuck2909 commented 2 years ago

The map is oriented lefthand side, so the right side of the map is cropped on my mobile device: signal-2022-05-22-193159_001

Here the same on the dekstop: image

Can you add an option to plot the map not oriented on the lefthand side but oriented centered ?

Then artefacts all around are would be cropped, which are not of interest at all.

Where as now the most left outer artefact is used to start the lefthand side oriented plot and parts of the map on the right hand side are cropped.

Thank you.

LayerCakeMakes commented 2 years ago

I'm running into the same issue but my overspray artefacts are not equal on all sides so I think finding a center would not make sense in my case. It would be helpful if I could just use crop to cut down the map and the resulting cropped square could then be centered in the container.