Ventus – Weather Map Widget & Shortcode

説明

Ventus allows you to easily embed the windy.com widget on your website, in the form of a native WordPress widget (accessible from Appearance > Widgets) or as a simple shortcode.

It is a lightweight plugin built using an object-oriented approach, and follows WordPress Coding Standards.

Features

  • Set the overlay to either clouds, CO concentration, radar/lightning, rain, sea temperature, snow cover, standard temperature, waves, or wind.
  • Use either Celsius or Fahrenheit as the temperature scale.
  • Set the width and height using responsive (%) and/or fixed (px) values.
  • Manually define longitude and latitude for precise location coordinates.
  • Choose from 8 levels of zoom (min. 3, max. 11).
  • Show or hide pressure isolines, the map marker and spot forecast.
  • Choose from the following wind measurement units: beaufort (bft), kilometers per hour (km/h), knots (kt), meters per second (m/s) and miles per hour (mph).

Shortcodes

The shortcode accepts up to 11 attributes. You can simply use [ventus] and it will work (or the old shortcode [weather-map] which will continue to work), but you will most likely want to customise the remaining attributes yourself.

An example of a fully filled-out shortcode would be:

[ventus width="100%" height="350px" lat="53.199" lon="-7.603" zoom="4" layer="wind" scale="C" units="knots" pressure="true"  marker="true" forecast="true"]. 

The attributes can be set as follows:
* The width attribute accepts any valid CSS property for width.
* The height attribute accepts any valid CSS property for height.
* The lat attribute must contain a string of digits to three decimal places, in the range of -90 to +90 (e.g. “53.199”).
* The lon attribute must also contain a string of digits to three decimal places, in the range of -180 to +180 (e.g. “-120.894”).
* The zoom attribute must contain a number between 3 and 11 (inclusive).
* The layer attribute accepts the following values: clouds, cosc (CO concentration), radar, rain, snowcover, sst (sea temperature), temp (standard temperature), waves and wind.
* The scale attribute accepts either “C” or “F”, defining Celsius and Fahrenheit respectively.
* The units attribute accepts the following values: bft (beaufort), km/h (kilometers per hour), kt (knots), m/s (meters per second) and mph (miles per hour).
* The pressure attribute can be set to true to display pressure isolines, otherwise the isolines will remain hidden.
* The marker attribute can also be set to true, otherwise it will remain hidden.
* The forecast attribute can be set to true to display the spot forecast, otherwise it will remain hidden.

Note that in the case of an invalid value, a default value will be used instead.

スクリーンショット

  • The wind layer, zoomed in over the west of Ireland. We talk a lot about the weather here. 🙂
  • The temperature layer, zoomed in over São Paulo, Brazil.
  • The CO (carbon monoxide) concentration layer, zoomed in over China.
  • The waves layer, zoomed in over the Atlantic Ocean.
  • The widget view from the admin area (Appearance > Widgets).

インストール

  1. No special set-up required – just click install and activate, and you’re good to go!
  2. If you manually download the plugin, just unzip to the WordPress plugins folder and the plugin will be automatically detected. It can then be activated as normal.

FAQ

Why not just embed the iframe directly from [windy.com](https://www.windy.com) instead of using this plugin?

If you’d prefer to do this, that’s great – no problem! However, this plugin was created to make the iframe that windy.com kindly provide even more useful. To that end, it offers the following advantages:

  • While an iframe can be inserted directly into a page or post, you can’t insert an iframe directly into the WordPress widgets area (which is how most themes allow you to set the content for site sidebars and footers etc). This plugin allows you to do precisely that.
  • And even in the case of an iframe inserted into a page or post, the generated code can often confuse people who don’t have any technical/programming experience. The shortcode provided by this plugin simplifies this considerably, making it readable and easy to customise by anyone.
  • You can change the default overlay from wind to either clouds, CO concentration, sea temperature, snow cover, standard temperature, radar/lightning, rain, or waves.
  • Width and height can be set to responsive (percentage-based) as well as fixed (pixel-based) values.

評価

2020年8月16日
It takes the hassle out of iframe placement or extra plugins. It's so simple to implement and the extra customisation is superb to tweak it to my needs. One of my friends is a racehorse trainer so I can set up a page with racecourses to keep track of the going conditions A big thumbs up and a massive thank you as it's the best widget I have ever used for weather by a country mile 🙂
2020年5月1日
Great looking delivery on the app and the widget was incredibly easy to work with. I entered all my factors to get my location on the visual through the widget. I was able to quickly modify the settings, try out other settings to decide what I wanted for my site. The visuals with the wind movement are incredibly cool. I can't get over how neat that looks. And it was a happy surprise to find the daily temps pop up on the frontend. I had spent a week struggling with another much less awesome weather app, and this went from download to fully functional in 10 minutes. I have very limited coding background. This was a pleasure.
2019年9月24日
I love this plugin. The plugin Author its very professional and ready to help. This plugin helped me in my project
4件のレビューをすべて表示

貢献者と開発者

Ventus – Weather Map Widget & Shortcode はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Ventus – Weather Map Widget & Shortcode” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。

変更履歴

1.2.0

  • Added Spot Forecast feature.
  • Added Brazilian Portuguese translation.

1.1.0

  • Re-named plugin from ‘Weather Map Widget’ to ‘Ventus – Weather Map Widget & Shortcode’.
  • Added new shortcode alias [ventus] (the old shortcode [weather-map] has been maintained for backwards-compatibility).
  • Added four new layers to select from: CO Concentration (cosc), Sea Temperature (sst), Snow Cover (snowcover) and Waves (waves).
  • Added general translation support and a French translation.
  • Added ability to choose from the following wind measurement units: beaufort (bft), kilometers per hour (km/h), knots (kt), meters per second (m/s) and miles per hour (mph).
  • Added ability to show/hide the map marker.
  • Added ability to show/hide to show hide pressure isolines.
  • Re-factored code (classes, package names, text domain etc) to reflect new plugin name.

1.0.1

  • Fixed issue with zoom levels when using shortcode.

1.0.0

  • Initial release.