Weather Widget
Display a Weather Forecast on Your Website for Free
How to Add a Weather Widget to a Website
1. Include the following code in your HTML where you want your widget to appear:
<div id="weatherwidget" class="weatherwidget" style="width:45%;float:left;"></div><script src="//widget.meteomatics.com/widget/<Location>/<lat_lon>/<orientation>/on/<target_id>/<unit>" type="text/javascript"></script>
2. Change the following to your liking:
- <Location>
The Name of the location that is shown above the forecast.
- <lat_lon>
The coordinates of the location you want to display the forecast for as latitude_longitude given in decimal degrees. (E.g. 47.424_9.377 for St. Gallen)
- <orientation>
The orientation of the widget. Either width for horizontal or height for a vertical layout.
- <target_id>
The id of the container that widget is to be shown in.
- <unit>
Temperature display in degrees Celsius ?unit=C or in degrees Fahrenheit ?unit=F . If not specified degrees Celsius are displayed.
Horizontal Widget
Vertical Widget
We provide the most accurate weather data for any location, at any time, to improve your business.
Head of Sales and Meteorologist
Customised industry solutions
Get in touch - we are here for you.
Contact us if you have questions about specific industry applications or would like advice from our experts! We look forward to your enquiry and will get back to you within one working day.