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

    API beta test

    Scheduled Pinned Locked Moved Windy API v4
    42 Posts 14 Posters 35.8k Views 2 Watching
    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.
    • marekdM Offline
      marekd Windy Staff @ShahramT
      last edited by

      @shahramt You should be able to store the map object into your custom variable which is accessible from the part of code you need. Or W.map.map (yes, 2 map) should work as well.

      1 Reply Last reply Reply Quote 1
      • marekdM Offline
        marekd Windy Staff
        last edited by

        Beta has been released to production. Thank you all for your help.

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          CompassDSNM @marekd
          last edited by

          @marekd

          Hi @marekd, could you please tag us in future? You have taken down our application in production this morning. Issues been reported to support.

          C 1 Reply Last reply Reply Quote 0
          • C Offline
            CompassDSNM @CompassDSNM
            last edited by

            @mared Could someone please help us? This version has completely broken us.

            C 1 Reply Last reply Reply Quote 0
            • C Offline
              CompassDSNM @CompassDSNM
              last edited by

              @marekd We have made some progress with the issues using the following:

              windyInit(options, windyAPI => {
              
                              const { map, picker, utils, overlays, store, broadcast, particles } = windyAPI;
              
                              let baseLayer = W.map.baseLayer;
              
                              W.map = W.map.map;
                              W.map.baseLayer = baseLayer;
              }
              

              The rest of our code uses W.map to address the map, so we have to assisn W.map.map to it. But this then lost w.Map.baseLayer, so we need to reassign it too.

              This has brought our application back to life, but one need issue could you look at?

              9c3ddb3f-4683-4cc1-9435-9847e5d939af-image.png

              We create a form on the map to control turning on / off other layers. Since the new version of Windy we are now getting a "cursor: not allowed;" when hovering over the checkboxes shown in the screenshot.

              The CSS is matching on input:read-only but our input checkboxes are not read only.... As you can see in the screenshot nothing is set to read only. But on hover of those inputs you get : 105fc619-84dd-4a9a-9769-4ed4a0aac53f-image.png

              C 1 Reply Last reply Reply Quote 0
              • C Offline
                CompassDSNM @CompassDSNM
                last edited by

                @marekd

                I can override the CSS with

                    #windy .form-group input:read-only {
                        cursor: initial; /*This is like a weird bug where it was showing checkboxes as disabled even if the input was not read-only*/
                    }
                

                but seems like a bug at your side.

                1 Reply Last reply Reply Quote 0
                • marekdM Offline
                  marekd Windy Staff
                  last edited by

                  @compassdsnm Sorry for all problems. I am glad it works for you again. Just please be careful with using of W object. As it stands in the documentation https://api.windy.com/map-forecast/docs

                  Do not use features not listed here as we cannot guarantee that they will be available in other versions of Map Forecast API.

                  And accessing W object and its inner properties are definitely risky part. It can happen again. I would suggest you to use only windyAPI object returned after initialization.

                  C 1 Reply Last reply Reply Quote 0
                  • C Offline
                    CompassDSNM @marekd
                    last edited by

                    @marekd We will need to discuss this internally. Initial feeling is that we would rather stay as close to a standard leaflet implementation as possible. Windy is a small part of our application.

                    @marekd can you reproduce the above CSS issue? I could create a simple page and set this up if you would like.

                    Euan

                    marekdM 1 Reply Last reply Reply Quote 0
                    • marekdM Offline
                      marekd Windy Staff @CompassDSNM
                      last edited by

                      @compassdsnm CSS pseudo class :read-only is applied correctly, checkboxes and radio buttons are considered as readonly inputs in browsers by default. There is nothing wierd about that. If you need to change this behaviour, feel free to override styles like you did.

                      C 1 Reply Last reply Reply Quote 0
                      • C Offline
                        CompassDSNM @marekd
                        last edited by

                        @marekd said in API beta test:

                        checkboxes and radio buttons are considered as readonly inputs in browsers by default.

                        @marekd I have never seen a checkbox or radio button having a default readonly value in all my life. Please can you share any documentation you have on this?

                        Mozilla's documentation says it is not default.
                        https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly

                        Prior to your release on Monday morning, this was working as expected.

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          Thiago Gabriel
                          last edited by

                          Hi again! I'm facing some issues with the WIND overlay in my ReactApp (not sure if the problem is related to React or not, though).

                          When the windyApi loads, the legend that shows the color scale is not generated. If I change the overlay manually, to any other overlay, the legend for that overlay is generated correctly. If then I change back to the WIND overlay, the legend is now generated.

                          I also noticed that I cannot change to the WIND overlay programatically. Using store.set("overlay","wind") yields to no results. Once again, this works if I use any other overlay as argument.

                          Here is a minimal reproduction of the issue: https://codesandbox.io/s/romantic-cloud-tio6qd?file=/src/App.jsx

                          Could you guys please take a look at this issues?
                          Thiago

                          marekdM 2 Replies Last reply Reply Quote 0
                          • marekdM Offline
                            marekd Windy Staff @Thiago Gabriel
                            last edited by

                            @thiago-gabriel Thanks for the report! You are right, it looks like a bug. To hofix this issue, please use:

                            store.set('overlay', 'wind', { forceChange: true }) 
                            

                            We try to fix it and release update today.

                            1 Reply Last reply Reply Quote 1
                            • marekdM Offline
                              marekd Windy Staff @Thiago Gabriel
                              last edited by

                              @thiago-gabriel It is fixed now, thanks again!

                              1 Reply Last reply Reply Quote 1
                              • DaFishD Offline
                                DaFish | Premium
                                last edited by

                                @marekd Thanks for the new updates and sorry haven’t seen the thread. I recently noticed that a couple of features have changed during the update.
                                1 Now data of ICON (Eu and Global) is only displayed every 3 hours by default, even though the time step is shown every 1 hour. GFS defaults to data every 1 hour as before
                                2 The satellite data is no longer automatically included as before. If ‘satellite’ set as the default layer of the API, it is visible. If the default is something else and the satellite is only in the favorite layer, it will not be visible at all.
                                Or have I previously used the wrong name for the satellite data (‘satellite’) and the layer has only been shown because it was the only data I had in that API

                                DaFishD Faizan Khan 10F 2 Replies Last reply Reply Quote 0
                                • DaFishD Offline
                                  DaFish @DaFish | Premium
                                  last edited by

                                  Sorry confusing, I have two account Saaneuvos and DaFish. Recently use the rare one

                                  1 Reply Last reply Reply Quote 0
                                  • saaneuvosS Offline
                                    saaneuvos | Premium
                                    last edited by

                                    @marekd Thanks for the new updates and sorry haven’t seen the thread. I recently noticed that a couple of features have changed during the update.
                                    1 Now data of ICON (Eu and Global) is only displayed every 3 hours by default, even though the time step is shown every 1 hour. GFS defaults to data every 1 hour as before
                                    2 The satellite data is no longer automatically included as before. If ‘satellite’ set as the default layer of the API, it is visible. If the default is something else and the satellite is only in the favorite layer, it will not be visible at all.
                                    Or have I previously used the wrong name for the satellite data (‘satellite’) and the layer has only been shown because it was the only data I had in that API

                                    marekdM nesroN 2 Replies Last reply Reply Quote 0
                                    • marekdM Offline
                                      marekd Windy Staff @saaneuvos
                                      last edited by

                                      @saaneuvos Thanks for the report! We will look into it and let you know.

                                      Airths LionHeartA 1 Reply Last reply Reply Quote 0
                                      • nesroN Offline
                                        nesro Windy Staff @saaneuvos
                                        last edited by

                                        Hi @saaneuvos ,

                                        • 1 hour animation step for ICON models is a feature available only for premium users logged in on Windy.com and it's not available in our Map Forecast API.

                                        • I checked your site and you are missing satellite in the favOverlays array. If you put it there, you should see the satellite option in the menu.

                                        Screenshot 2022-08-25 at 9.54.18.png

                                        Tomas Nesrovnal - windy.com developer

                                        saaneuvosS 1 Reply Last reply Reply Quote 2
                                        • saaneuvosS Offline
                                          saaneuvos @nesro | Premium
                                          last edited by

                                          @nesro and @marekd Thanks. Before the update, there was 1 hour animation step in IconEU in premium API! And in GFS there is 1 hour a.s. I think there should be 1 hour a.s. for premium customers for paid version at least for the IconEu ( because no Ecmwf). In my opinion GFS and IconGloal could be 3 hour a.s.

                                          saaneuvosS 1 Reply Last reply Reply Quote 0
                                          • saaneuvosS Offline
                                            saaneuvos @saaneuvos | Premium
                                            last edited by

                                            @nesro and @marekd If the reason is the animation, it would be OK to have 3 hour a.s. there, but to have possibility too look data for every 1 hour time step?

                                            nesroN 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Windy Community  |  Powered by excellent NodeBB
                                            Terms of Use     Privacy Policy     Windy.com