nathan-gs / ha-map-card

A Map Card for Home Assistant
https://community.home-assistant.io/t/map-card-a-slightly-improved-map-card/693088
MIT License
15 stars 4 forks source link

Show all markers by default. #67

Closed thybag closed 2 weeks ago

thybag commented 3 weeks ago

If x/y coords and focus_entity have not been provided, the map will now default to showing all current markers via leaflets fitBounds mechanism.

This seems like a sensible default for cases where a more specific choice has not been made. It also makes it easy to just see all markers, automatically focusing closer if they all happen to be near.

fixes https://github.com/nathan-gs/ha-map-card/issues/66

thybag commented 2 weeks ago

Hi @nathan-gs, that makes sense. Have pulled the initial display logic out to its own stand alone method. Given we only ever call in by the one function, seemed sensible to skip doing a full class for this, but your call if you prefer that style 👍 Easy enough to swap it over.