• Resolved aggieoutlaw8

    (@aggieoutlaw8)


    You have a great plugin!
    We are trying to use this in a static code block. Do you have any suggestions to make it work?

    Thanks!

    • This topic was modified 3 years, 8 months ago by aggieoutlaw8.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author David Matthew

    (@davidmatthew)

    Hi aggie,

    Do you mean in a Custom HTML block? If so, you could use either the widget or the shortcode to embed it on a page, and then copy the generated iframe code (using your browser’s inspector tool – usually available when you right-click something). For example, the generated iframe code behind the widget I have embedded here is below:

    <iframe style="box-sizing: border-box; width: 100%; height: 350px; border-radius: 20px" src="https://embed.windy.com/embed2.html?lat=53.199&lon=-7.603&zoom=8&overlay=cosc&marker=&pressure=&detailLat=53.199&detailLon=-7.603&metricWind=default&metricTemp=°C&detail=true&calendar=now&product=ecmwf&level=surface&menu=&message=true&type=map&location=coordinates&radarRange=-1" frameborder="0"></iframe>

    You have a great plugin!

    Thanks a million, really appreciate it! ??

    Hope this helps.

    Thanks,
    David

    Thread Starter aggieoutlaw8

    (@aggieoutlaw8)

    Thanks for your reply! How would we use the lat long from the post itself? Also is there an issue with Chrome? We have to reload the page a few times to get the forecast etc.

    Thanks again!

    Plugin Author David Matthew

    (@davidmatthew)

    Hey aggie, if you have to reload a few times there might be some browser or server caching going on, it’s hard to say. I haven’t experienced that on my own site.

    How would we use the lat long from the post itself?

    I’m not fully sure what you mean here? The easiest way to get whatever latitude and longitude you need would actually be to go straight to windy.com and make note of the first two numbers after the URL, e.g. windy.com/?53.338,-6.259; you can use these as your arguments then in the iframe src URL, like so:

    lat=53.338&lon=-6.259

    Hope this helps!

    Thread Starter aggieoutlaw8

    (@aggieoutlaw8)

    David,
    Thanks for your response! Well for our site the listings are using Lat Long to display the location of the listing so we use this shortcode in the shortcode block…

    [ventus width=”100%” height=”350px” radius=”20px” lat=”[[location.lat]] ” lon=”[[location.lng]] ” zoom=”14″ layer=”radar” scale=”F” units=”mph” marker=”true” forecast=”false” time=”24″]

    In the static code block we cannot use the brackets for LAT/Long so I was wondering if you had a workaround? Our theme lets us assign listing packages so we wanted to make the weather block a premium feature which we can’t do without using the static block.

    Plugin Author David Matthew

    (@davidmatthew)

    Ah ok, thanks for clarifying aggie. I don’t have a workaround for this I’m afraid. You might need some custom JavaScript for this, maybe using the Geolocation API?

    Mozilla Docs – Geolocation API

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Static Code Block?’ is closed to new replies.