Giter Site home page Giter Site logo

Comments (13)

nathan-gs avatar nathan-gs commented on September 24, 2024

The history is loaded async, so it could be it's just slow.

from ha-map-card.

nathan-gs avatar nathan-gs commented on September 24, 2024

It should be solved in v0.8.2.

from ha-map-card.

nathan-gs avatar nathan-gs commented on September 24, 2024

I added unsubscribe logic hopefully solving this.

from ha-map-card.

Hiekkaharju avatar Hiekkaharju commented on September 24, 2024

Sorry but this seems to still exist.
And now I checked also "from the view with the card to another and then back" with browser and that also fails (view= "tabs" on a dashboard.
When going to another dashboard and then returning works = from sidebar.

from ha-map-card.

nathan-gs avatar nathan-gs commented on September 24, 2024

Can you take a look at the Browser console to see if you see any error?

from ha-map-card.

Hiekkaharju avatar Hiekkaharju commented on September 24, 2024

1st: I'm no web developer, I just and just knew where to find the console :) Please don't expect much...
Not really any errors. [Violation] 'requestAnimationFrame' handler took ###ms comes, but it also comes with F5 refresh succesful draw.
When leaving the view, I see unsubscribe notices. But only with F5 or dashbord change I see "First render.." and subscribe notices, not by just a view change

from ha-map-card.

Hiekkaharju avatar Hiekkaharju commented on September 24, 2024

I might have figured this out.
Adding
this.firstRenderWithMap = true;
to e.g. place where
this.map.remove();
is done, seems to fix the issue.

from ha-map-card.

nathan-gs avatar nathan-gs commented on September 24, 2024

Very interesting @Hiekkaharju! I just noticed I might have the same issues in certain cases. Will try your work around!

from ha-map-card.

nathan-gs avatar nathan-gs commented on September 24, 2024

Can you test with v0.9.0?

from ha-map-card.

Hiekkaharju avatar Hiekkaharju commented on September 24, 2024

Seems to work. Thanks again :)

OT + FYI: I see you added fallback coordinates. If I read the code correctly they will be used only if longitude/latitude is empty.
I've a device which returns -1,-1 as coordinates if it can't get a fix. I don't know if that's common.
I've already earlier made an automation which replaces those -1,-1 with fixed coordinates using see-service, so I do not need support for -1 fallback, but somone else might.

from ha-map-card.

nathan-gs avatar nathan-gs commented on September 24, 2024

Problem is -1,-1 however unlikely is a valid coordinate. Would be better to set it to null.

from ha-map-card.

nathan-gs avatar nathan-gs commented on September 24, 2024

It would not be hard to check for this. WDYT @Hiekkaharju?

from ha-map-card.

Hiekkaharju avatar Hiekkaharju commented on September 24, 2024

Based on your previous reply, if I were you, I would leave it for now and if someone else later asks for it, take this as a +1

edit: I decided to add info that the -1,-1 I have seen is generated by an esphome device. Thus it's likelihood in HA enviroment is bigger than that of some random device.

from ha-map-card.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.