Closed Manuel-Materazzo closed 3 months ago
@Manuel-Materazzo let me know when ready!
ps. I don't have your issue, odd.
Salutations, I've done some digging on the issue, and it turns out that the card works flawlessly on any pre-2023.7.0 homeassistant versions. I've tested using clean docker container installations, specifically on these versions and using HACS: ... 2023.6.0 - no issues 2023.7.0 - map loading issue 2023.9.0 - map loading issue 2023.10.0 - map loading issue 2023.12.4 - map loading issue 2024.2.2 - map loading issue (my main installation)
Interestingly enough, starting with 2023.7.0 the card_size: 16
property does not create a "full-screen" card by default, unless you select the "panel" view for the dashboard. I guess it might be related, considering that the root of the issue is leaflet not being able to correctly pick up the canvas size.
Also i noticed i messed up the merge request by pushing other things, the "quick hack" i mentioned was on the force first render commit.
@Manuel-Materazzo thanks a lot for testing, I'm on 2023.11 without issue. Will test your PR and provide feedback+merge.
Thanks a lot!
@Manuel-Materazzo thanks a lot for testing, I'm on 2023.11 without issue. Will test your PR and provide feedback+merge.
Thanks a lot!
Weird, i just tested with a clean docker installation of 2023.11 + hacs and i can reproduce the issue.
Greetings, I'm no expert of lit-element, but it seems that on some instances the render() method does not fire a second time after the page load, leaving the card like this until user interaction (mainly because of the missing map.invalidateSize() call ) :![Screenshot 2024-03-15 105158](https://github.com/nathan-gs/ha-map-card/assets/20266095/76d03eb8-e749-4dce-815d-e8db9e6972e1)
The issue seems to arise only the first time the dashboard with the map card is loaded, without error output. I've solved the issue with a quick hack, but it would be great if you can look into it.