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

    External plugins: reliable initial forecast location on mobile?

    Scheduled Pinned Locked Moved Windy Plugins
    1 Posts 1 Posters 67 Views 1 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.
    • M Offline
      mwindy 3 | Premium
      last edited by

      I’m publishing a humidity forecast plugin and ran into an ambiguity with the initial location on mobile.

      When the plugin opens, HOME and SEARCH can leave Windy in different initial states:

      • After pressing Home, the map center appears to be the intended location
      • After searching, the offset crosshair appears to be the intended location

      The plugin can read both the map center and picker.pickerDot.getLatLon(), but I haven’t found a reliable public API signal that tells an external plugin which one Windy currently considers the authoritative forecast location on initial open. To avoid loading a forecast for the wrong place, I've had to make the plugin wait for the user’s first intentional map movement, then uses the crosshair location.

      Is there an existing supported API for getting the location Windy currently considers selected/authoritative when an external plugin opens? If not, would exposing that location be something Windy could consider adding?

      Plugin/source for context:
      https://github.com/markkn/windy-plugin-humidity-forecast

      Thanks for any help!

      1 Reply Last reply Reply Quote 0
      • M mwindy 3 referenced this topic
      • First post
        Last post
      Windy Community  |  Powered by excellent NodeBB
      Terms of Use     Privacy Policy     Windy.com