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

    Are the URL parameters passed to the plugin

    Windy Plugins
    2
    3
    677
    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.
    • Mortimer CatM
      Mortimer Cat | Premium
      last edited by

      If I call open Windy with the following URL, I get the map centred at -22,49 (wherever that may be)
      https://www.windy.com/plugin/contrails?-22.715,49.109,5,i:pressure

      _params in my plugin code is always undefined.

      export const onopen = (_params: any) => {
             console.log('PARAMS', _params);
         };
      

      PARAMS undefined

      Question 1) Should I be seeing something in _params?

      Question 2) I want to pass a parameter to my plugin - in my case it will be the altitude I want to examine. How would I format that in my URL?

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

        @Mortimer-Cat

        See https://docs.windy-plugins.com/getting-started/#opening-plugin-with-parameters and check the examples at https://github.com/windycom/windy-plugin-template/tree/main/examples

        That should answer your question

        Mortimer CatM 1 Reply Last reply Reply Quote 1
        • Mortimer CatM
          Mortimer Cat @vicb | Premium
          last edited by

          @vicb Thank you

          I missed the routerPath configuration. it works perfectly now.

          1 Reply Last reply Reply Quote 1
          • 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