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

    Opening a plugin at a given location does not work any more ?

    Windy Plugins
    3
    13
    1.6k
    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.
    • vicbV
      vicb Paraglider | Premium
      last edited by

      For example
      https://www.windy.com/plugins/windy-plugin-sounding?lat=38.594480333494715&lon=-112.12185243531977

      open the plugin at my current location instead of the passed location

      KorinaK 1 Reply Last reply Reply Quote 0
      • KorinaK
        Korina @vicb
        last edited by

        @vicb Hello, I just tried the plugin and it opened at the location I put the picker on. What exactly happens when you open it?

        Korina

        vicbV 1 Reply Last reply Reply Quote 1
        • vicbV
          vicb Paraglider @Korina | Premium
          last edited by

          @Korina The passed location is ignored and it opens at my current location

          KorinaK 1 Reply Last reply Reply Quote 0
          • KorinaK
            Korina @vicb
            last edited by

            @vicb What do you mean by "passed location"? The plugin opens for the location on the map.

            Korina

            vicbV 1 Reply Last reply Reply Quote 1
            • vicbV
              vicb Paraglider @Korina | Premium
              last edited by

              @Korina when you use the URL I give in the first post, the plugin is supposed to open at the location passed in the parameters wherever you physically are located.
              It does not work anymore and the plugin opens at your current location.
              I'm talking about the initial location, not subsequent plugin openings.
              It is probably due to a running change in windy. I might be able to workaround that.

              vicbV 1 Reply Last reply Reply Quote 0
              • vicbV
                vicb Paraglider @vicb | Premium
                last edited by

                So it is indeed something that break in windy at some point.

                We use to be able to use this.query in the plugin to access the parsed query string. It is not defined any more.

                I've asked @rittels if he knows where this has moved and I will also try to dig a but in windy sources to figure out.

                vicbV 1 Reply Last reply Reply Quote 0
                • vicbV
                  vicb Paraglider @vicb | Premium
                  last edited by

                  So digging into the code I found:

                  W.define("Plugin", ["rootScope", "utils", "trans"], (function(e, t, n, i) {
                      var r = i.loadLangFile
                        , o = function(e) {
                          var t, n, i, r;
                          this.initProperties(),
                          this.dependencies = null !== (t = e.dependencies) && void 0 !== t ? t : this.dependencies,
                          this.exclusive = e.exclusive,
                          this.ident = e.ident,
                          this.langFiles = e.langFiles,
                          this.location = e.location,
                          this.close = null !== (n = e.close) && void 0 !== n ? n : this.close,
                          this.paramsChanged = null !== (i = e.paramsChanged) && void 0 !== i ? i : this.paramsChanged,
                          this.redraw = null !== (r = e.redraw) && void 0 !== r ? r : this.redraw
                      };
                  

                  If you add a this.query = e.query in this code then the former behavior is restored and you can access this.query in i.e. your plugin onopen.

                  @marekd Is that something that can be fixed in windy so that we restore the former behavior or is it intended and we need to retrieve the query from somewhere else?

                  rittelsR 1 Reply Last reply Reply Quote 0
                  • rittelsR
                    rittels Code contributor @vicb | Premium
                    last edited by

                    @vicb The plugin system is being refactored, for now the query parameters can be found here:

                    W.plugins.plugins.pluginInfo["windy-plugin-xyz"].query
                    
                    vicbV 1 Reply Last reply Reply Quote 1
                    • vicbV
                      vicb Paraglider @rittels | Premium
                      last edited by

                      @rittels W.plugins.plugins.pluginInfo is undefined

                      rittelsR 1 Reply Last reply Reply Quote 0
                      • rittelsR
                        rittels Code contributor @vicb | Premium
                        last edited by

                        @vicb It is created when the plugins gallery is opened.

                        vicbV 1 Reply Last reply Reply Quote 0
                        • vicbV
                          vicb Paraglider @rittels | Premium
                          last edited by

                          @rittels

                          I was checking on windy.com/dev and it is not populated there - could this version be lagging behind?

                          I see it being populated on windy.com

                          rittelsR 1 Reply Last reply Reply Quote 0
                          • rittelsR
                            rittels Code contributor @vicb | Premium
                            last edited by

                            @vicb Yes, it does not work in dev yet. In the new version it should work.

                            vicbV 1 Reply Last reply Reply Quote 0
                            • vicbV
                              vicb Paraglider @rittels | Premium
                              last edited by

                              It would be nice if Windy gives more a little more consideration to plugin developers.

                              During the migration to TS we had to ask for a way to be able to test the plugins.

                              I have reported this query issue last September it nothing has been done since then - I think it would be an easy fix to make this.query available as it was before.

                              Having a dev version (windy.com/dev) that is not in sync with windy.com does not help.

                              It seems like some other changes are on the way. I hope windy can provide a way to test the updates before they are released.

                              1 Reply Last reply Reply Quote 2
                              • vicbV vicb referenced this topic on
                              • 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