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

    Embedded Windy at bottom of page doesn't come up centered properly.

    Scheduled Pinned Locked Moved Developers
    4 Posts 3 Posters 1.5k 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.
    • L Offline
      Lord Beowulf
      last edited by

      Hi,

      First off, thanks for a really cool service. I came across this about a month ago when looking to jazz up my observatory's weather page a bit. I've embedded the provided frame code below another linked image from NOAA GOES. You can see the result at https://weather.orionranchobservatory.com/extras.htm. The problem that you should encounter is that when you scroll down to the Windy frame, it's centered in Oklahoma instead of Central Texas. If you refresh the page while viewing the Windy frame, then it will center properly and you see the icon highlighting the location. I'm guessing that this has something to do with an interaction between the visible window and the scrolled location, but don't know if there's an HTML way for me to fix it vs. something with the linked data itself that would need to be fixed.

      Thanks for any guidance,

      Beo

      rittelsR 1 Reply Last reply Reply Quote 1
      • M Offline
        micpalmia
        last edited by

        Have you found a solution to this? If the iframe (with detail=true) is not in the view when the page loads and users scroll down, the iframe loads while users are scrolling and the auto-centering does not work.

        I specify width and height in the call, so not sure why auto-centering is needed at all.

        Any suggestions more than welcome!

        1 Reply Last reply Reply Quote 0
        • M Offline
          micpalmia
          last edited by

          Sorry for the double post but couldn't seem to be able to edit the previous.

          This does not happen on Safari, and here is a jsfiddle in case it's of any use:
          https://jsfiddle.net/vm4e78j3/5/

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

            @Lord-Beowulf

            workaround hack for you:

            
            < iframe style="border:0px; position:fixed; left:0px; top:0px; opacity:0.01"  onload="setTimeout(()=>{this.style.position='relative';  this.style.opacity=1},1000)" width="650" height="800" src="https://embed.windy.com/embed2.html?lat=30.69&lon=-98.1&zoom=7&level=surface&overlay=wind&menu=&message=&marker=&calendar=now&pressure=&type=map&location=coordinates&detail=true&detailLat=30.69&detailLon=-98.1&metricWind=default&metricTemp=default&radarRange=-1" >< /iframe>
            
            
            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            Windy Community  |  Powered by excellent NodeBB
            Terms of Use     Privacy Policy     Windy.com