Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    t.CharAt is not a function

    Windy Plugins
    3
    6
    1.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jakubvranaJ
      jakubvrana | Premium
      last edited by

      When calling getPointForecast, I'm getting this error:

      Uncaught (in promise) TypeError: t.charAt is not a function
          at K (index.js:1:9086)
          at tn (index.js:1:38821)
          at an (index.js:1:39661)
          at y (windy-plugin-pg-mapa:1:1406)
          at i. (windy-plugin-pg-mapa:1:777)
          at i.fire (leaflet140_patched_tileLayer.v17.js:5:5090)
          at i.cb (windy-plugin-pg-mapa:1:1324)
          at i.value (index.js:1:269203)
          at i.value (index.js:1:267558)
      

      The error is visible at https://www.windy.com/plugins/windy-plugin-pg-mapa?iconEu,48.384,20.016,9 when you click any takeoff.

      Please help.

      SutyS 1 Reply Last reply Reply Quote 0
      • SutyS
        Suty Administrator @jakubvrana
        last edited by

        @jakubvrana There were certain changes made and the plugin needs to be updated. Newly, the method returns Promise with data, instead of string with URL.

        jakubvranaJ 2 Replies Last reply Reply Quote 0
        • jakubvranaJ
          jakubvrana @Suty | Premium
          last edited by

          @Ondřej-Šutera Thanks, now it works. It's the same for getMeteogramForecast.

          1 Reply Last reply Reply Quote 1
          • jakubvranaJ
            jakubvrana @Suty | Premium
            last edited by

            @Ondřej-Šutera There's one more problem. I'm displaying the wind forecast with this code:

            W.store.set("detailDisplay", "wind");
            W.broadcast.fire("rqstOpen", "detail", "...");
            

            This doesn't work anymore because store doesn't have detailDisplay anymore. How can I display the wind (or meteogram) forecast now?

            marekdM 1 Reply Last reply Reply Quote 0
            • marekdM
              marekd Administrator @jakubvrana
              last edited by

              @jakubvrana It is quite tricky now. The detail plugin has been rewritten to svelte, so it is now a part of inner svelte store. You can force it only when detail plugin has not been open yet:

              W.broadcast.emit('rqstOpen', 'detail', { display: 'wind', source: 'url', ... });
              

              But in a case it has been already open, I am affraid there is no way how to achive what you need :-/

              jakubvranaJ 1 Reply Last reply Reply Quote 0
              • jakubvranaJ
                jakubvrana @marekd | Premium
                last edited by

                @marekd It doesn't work.

                W.broadcast.fire("rqstOpen", "detail", {"lat":48.44783,"lon":19.98392,"display":"wind"});
                

                This still opens the basic forecast, not the wind forecast.

                Can you add back the option to display different kinds of forecast? It's very useful to have this quickly available.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
                NodeBB & contributors, OSM & contributors, HERE maps
                Terms of Use     Privacy Policy