Linux 软件免费装
Banner图

Ventus - Weather Map Widget & Shortcode

开发者 davidmatthew
更新时间 2024年3月21日 06:48
PHP版本: 7.0 及以上
WordPress版本: 6.1
版权: GPL-3
版权网址: 版权信息

标签

map weather forecast weather forecast windy weather map ventus

下载

1.0.1 1.1.0 1.4.0 1.0.0 1.2.0 1.3.0

详情介绍:

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 Shortcodes The shortcode accepts up to 13 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" radius="20px" loading="lazy" lat="53.199" lon="-7.603" zoom="4" layer="wind" scale="C" units="knots" pressure="true" marker="true" forecast="true" time="12"]. The attributes can be set as follows: Note that in the case of an invalid value, a default value will be used instead.

安装:

  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.

屏幕截图:

  • 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).

常见问题:

Why is the map showing the wrong location?

This can happen sometimes with the shortcode if you wrap the longitude or latitude attributes in the wrong kind of quote marks. Mark sure you are using " " rather than ” ”, e.g. Correct: lat="44.096" Incorrect: lat=”44.096” = How do I set the latitude and longitude? The easiest (and recommended) way to do this is to go straight to windy.com. Once there, take note of the URL. It will contain the latitude and longitude in its parameters, and if you zoom in, it will also contain the zoom level. For example, the sample parameters I use as defaults are: latitude 53.199, longitude -7.603, and a zoom level of 5. These would show in the URL in the following format: windy.com/?53.199,-7.603,5.

Why not just embed the iframe directly from 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.

更新日志:

1.4.0 1.3.0 1.2.0 1.1.0 1.0.1 1.0.0