Windy Community

    • Register
    • Login
    • Search
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    1. Home
    2. vicb
    3. Posts
    • Profile
    • Following 0
    • Followers 6
    • Topics 16
    • Posts 122
    • Best 45
    • Controversial 0
    • Groups 3

    Posts made by vicb

    • RE: How to list the models available at [map center]?

      It seems like the windy sounding plugin has that hardcoded:

      u = ["ecmwf", "gfs", "icon", "iconD2", "iconEu", "bomAccess", "namConus", "namHawaii", "namAlaska", "hrrrAlaska", "hrrrConus", "ukv"]
      
      posted in Windy Plugins
      vicb
      vicb
    • RE: How to list the models available at [map center]?

      Follow up question for @marekd

      Is there an easy way to know if the model has sounding data? (i.e. mbue doesn't)

      Thanks

      posted in Windy Plugins
      vicb
      vicb
    • RE: How to list the models available at [map center]?

      Seems like the correct way is:

      W.require('models').getAllPointProducts({lat: 37, lon: -121});
      
      posted in Windy Plugins
      vicb
      vicb
    • How to list the models available at [map center]?

      I use the following code in my plugin:

      const windyStore = W.require("store");
      
            const models = windyStore
              .get("visibleProducts")
              .filter((p) =>
                SUPPORTED_MODEL_PREFIXES.some(
                  (prefix) => p.startsWith(prefix) && !p.endsWith("Waves") && !p.endsWith("Analysis")
                )
              );
      

      I have to do some filtering (aka black magic) to remove unwanted values.

      There should be a proper way.

      I see that the built-in plugin also displays a list of available model.
      But it is buggy: the list is only updated when the plugin is opened. So when you open the plugin over the USA and navigate to i.e. Europe, the list is wrong.

      /cc @marekd

      posted in Windy Plugins
      vicb
      vicb
    • RE: Opening a plugin at a given location does not work any more ?

      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.

      posted in Windy Plugins
      vicb
      vicb
    • RE: Opening a plugin at a given location does not work any more ?

      @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

      posted in Windy Plugins
      vicb
      vicb
    • RE: Opening a plugin at a given location does not work any more ?

      @rittels W.plugins.plugins.pluginInfo is undefined

      posted in Windy Plugins
      vicb
      vicb
    • RE: Opening a plugin at a given location does not work any more ?

      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?

      posted in Windy Plugins
      vicb
      vicb
    • RE: Opening a plugin at a given location does not work any more ?

      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.

      posted in Windy Plugins
      vicb
      vicb
    • RE: Opening a plugin at a given location does not work any more ?

      @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.

      posted in Windy Plugins
      vicb
      vicb
    • RE: Opening a plugin at a given location does not work any more ?

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

      posted in Windy Plugins
      vicb
      vicb
    • Opening a plugin at a given location does not work any more ?

      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

      posted in Windy Plugins
      vicb
      vicb
    • RE: [CLOSED] v35.0.0

      @rittels I'm using windyPicker.on("pickerMoved", ({ lat, lon }) => {...}) and it still seems to work, do you confirm ?

      posted in Public beta
      vicb
      vicb
    • RE: [CLOSED] v35.0.0

      @marekd said in v35.0.0:

      https://www.windy.com/beta-test

      Thanks for the heads up - it is super convenient to test plugins (and I am happy to have nothing to do this time)

      posted in Public beta
      vicb
      vicb
    • RE: [CLOSED] v34.0.0

      @marekd Thanks, it solved my issue.

      It was not too hard (a couple hours) to make my plugin work with both the beta and the stable version.

      Thanks for continuously improving windy !

      posted in Public beta
      vicb
      vicb
    • RE: [CLOSED] v34.0.0

      My plugin calls W.require("favs").getArray() to retrieve the favorites.

      With the beta version W.require("favs").getArray() returns an empty array. However the same code executed from the JS console returns the list of favorites as expected.

      My guess is that the favorites are not initialized at the time of the call by my plugin. What would be the best way to solve this ?

      Edit: I wrapped the call inside a setTimeout(,1000); and it works again with the the beta. This seems to confirm something is not initialized yet.

      posted in Public beta
      vicb
      vicb
    • RE: Plugin developers, stay alert. We are refactoring Windy.com client codes to typescript!

      @marekd said in Plugin developers, stay alert. We are refactoring Windy.com client codes to typescript!:

      windyVersion

      Looks great.
      Thanks and good luck with the refactoring.

      posted in Windy Plugins
      vicb
      vicb
    • RE: Plugin developers, stay alert. We are refactoring Windy.com client codes to typescript!

      @rittels

      I was actually thinking the other way around:

      main would be the default (i.e. dist/plugin.js)

      and main_updates would be your old_windy_version but if the version is >= 33.0.0 then the other js would be loaded instead.

      Algo would be: use the highest version from main_updates that is less or equal to current windy API version and use main if none found.

      But I guess both would work

      posted in Windy Plugins
      vicb
      vicb
    • RE: Plugin developers, stay alert. We are refactoring Windy.com client codes to typescript!

      I have updated my plugin to use:

      const $ = W.require("utils").$ || W.require("$");
      

      Note that the order is important here as W.require("$") would crash the next version if first in the expression (as the module is going away).

      That should be the only required change for my plugin.

      posted in Windy Plugins
      vicb
      vicb
    • RE: Using foreign Webcams on the WINDY SITE

      @tdevito There is indeed a link to the "home site" on webcam pages - I am not sure if that's what you are looking for:

      49f7cf65-9c81-4a47-98af-5e748521287a-image.png

      posted in Developers
      vicb
      vicb