|
1 | 1 | 
|
2 | 2 |
|
3 |
| -# Windy API v4 |
4 |
| -Windy API v4, also known as as Windy Leaflet Plugin, is simple to use javascript API based on [Leaflet](https://leafletjs.com/) and technology, that powers [Windy.com](https://www.windy.com). |
| 3 | +# Windy JavaScript API |
5 | 4 |
|
6 |
| -Windy API uses Leaflet version `1.4.x`. |
| 5 | +Windy JavaScript API is a simple-to-use library based on [Leaflet](https://leafletjs.com/) **1.4.x**. It allows you to use everything Leaflet or JavaScript offers along with the Windy map visualizations we are using at [Windy.com](https://www.windy.com/). |
7 | 6 |
|
8 |
| -## Upgrade from previous version of an API |
9 |
| -Windy API v4.5 was based on `Leaflet 0.7.7`. We hope that transition to the new version of Leaflet will be smooth. Both APIs are basically the same. |
| 7 | +This repository contains only Windy JavaScript API examples, check [https://api.windy.com/](https://api.windy.com/) for more info. |
10 | 8 |
|
11 |
| -Just replace `<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>` with `<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>` |
12 |
| -in your HTML code and you should be done. |
13 |
| - |
14 |
| -## Getting started |
15 |
| -Obtain your [Windy API key here](https://api4.windy.com/api-key/) and check out our tutorials. You will handle our API in less than 20 minutes! |
| 9 | +Do you think any particular example or tutorial is lacking? PR is more than welcome! |
16 | 10 |
|
17 | 11 | ## Examples
|
18 |
| - - [Hello World](https://api4.windy.com/examples/hello-world/) |
19 |
| - - [Change Windy parameters](https://api4.windy.com/examples/parameters/) |
20 |
| - - [Observe what is happening inside](https://api4.windy.com/examples/bcast/) |
21 |
| - - [Mess with User Interface](https://api4.windy.com/examples/navigation/) |
22 |
| - - [Change units](https://api4.windy.com/examples/metrics/) |
23 |
| - - [Use weather picker](https://api4.windy.com/examples/picker/) |
24 |
| - - [Boat tracker](https://api4.windy.com/examples/boat-tracker/) |
| 12 | + - [Hello World](examples/hello-world/) |
| 13 | + - [Change Windy parameters](examples/parameters/) |
| 14 | + - [Observe what is happening inside](examples/bcast/) |
| 15 | + - [Mess with User Interface](examples/navigation/) |
| 16 | + - [Change units](examples/metrics/) |
| 17 | + - [Use weather picker](examples/picker/) |
| 18 | + - [Boat tracker](examples/boat-tracker/) |
25 | 19 |
|
26 | 20 | ## Other resources
|
27 |
| - - [Manage your API key](https://api4.windy.com/api-key/) |
| 21 | + - [Windy API homepage](https://api.windy.com/) |
| 22 | + - [Windy API community discussion](https://community.windy.com/category/12/windy-api) |
28 | 23 | - [Leaflet documentation](https://leafletjs.com/)
|
29 | 24 | - [Leaflet Plugins](https://leafletjs.com/plugins.html)
|
30 |
| - - [Windy API community discussion](https://community.windy.com/category/12/windy-api) |
31 |
| - |
32 |
| -## Things to remember |
33 |
| - - While providing coordinates to Leaflet can be done via object `{ lat, lng }` with **lng** property, Windy supports `{ lat, lon }` with **lon** property. |
34 |
| - - There can be only one instance of Windy Map on a page, but you can use multiple instances of Leaflet map on the same page. |
35 |
| - - All classes of `leaflet.css` are nested inside `#windy` selector (not to interfere with your own CSS), so if you want to use another instance of Leaflet map on the same page load `leaflet.css` yourself once more. |
36 |
| - - Windy uses a lot of global defined CSS classes and id selectors, with nice names like `#bottom, #logo` etc. Windy also puts a lot of CSS classes to `body` tag dynamically. If design of Windy Map is broken, check your CSS and rename your id and selectors please. |
37 |
| - - Windy API v4 does not use cookies |
38 |
| - - Windy API v4 heavily uses `localStorage`. Unintentional or intentional modifications of our items can lead to instability of Windy API. |
39 |
| - - Using undocumented functions of Windy engine can break your app, when we decide to upgrade our codes. If you miss something, rather [let us know here](https://community.windy.com/category/12/windy-api) and ask us to document and expose other features. |
40 |
| - |
41 |
| -## Conditions of use |
42 |
| -### Free version |
43 |
| -Windy API is free and with unrestricted traffic usage, but offers only the `gfs` forecast model and only `wind`,`rain`,`clouds`, `temperature`, `pressure`,`currents` and `waves` layer. The Windy logo MUST remain as it is, i.e. clickable and without modification. However, you can move the Windy logo wherever you want within the Windy map. For the free version of the API, we reserve the right to 1) display advertisement inside the Windy map, 2) place "Download Windy App" message from time to time on mobile devices, or 3) discontinue free version of Windy API v4 at any time without prior notice |
44 |
| - |
45 |
| -### Paid version |
46 |
| -For serious work, we recommend to use the paid version that contains `iconEu`, `nam` and `gfs` models and the most of all `layers` and also `isolines`. For less than 5000 daily requests there is no advertising in paid version - if you exceed 5000 requests in a day, advertising will be displayed. It costs only 720USD per year (ordered via [this form](https://pipedrivewebforms.com/form/29db1a578673fdebbafc5c5c5816e1eb5803983) and paid annually via invoice). Developers of paid version can decrease opacity of Windy logo to 0.8 (however logo must remain clickable) and usage limit is average of 5.000 Unique Visitors a day (measured by Google Analytics). For permission to a higher quota, please contact us. |
47 |
| - |
48 |
| -We are not allowed to provide ECMWF data to third parties, and therefore we cannot provide layers based on this data model (`thunder`, `deg0`, `cloudtop`, `cbase`, `visibility`, `swell3`, `snowcover`, `ozone`, `sst` and `cape`). Please note that some layers are based on multiple forecast models. Such layers are available, however, without ECMWF forecasts (for example: `waves`, `wind waves` or `swell` where the **Wavewatch 3** model does not cover the Mediterranean Sea and other areas). We also cannot provide you with the `radar` layer. Everything else is included in the paid version. Please check the map for yourself at [Windy.com](https://www.windy.com/) and see if it meets your expectations. |
49 |
| - |
50 |
| -Please bear in mind, that Windy does not provide any individual support even for the paid version. If you have any concerns, please report it to the relevant subsection on [Windy Community](https://community.windy.com/category/12/windy-api-v4). Topics there are regularly checked by our developers. |
51 |
| - |
52 |
| -### Non-commercial projects |
53 |
| -Interesting and non-commercial sites using Windy API can ask for free upgrade to the paid version. The condition is that your project will be open sourced on GitHub. If this is your case, use the same form for paid version and describe your request. |
54 |
| - |
55 |
| -## Technical support |
56 |
| -Drop a line in our [Windy API section](https://community.windy.com/category/12/windy-api) of our Windy Community forum. |
57 |
| - |
58 |
| -## Changelog |
59 |
| -###### [4.7] - 2019-04-29 |
60 |
| -- Finally version with `Leaflet 1.4.` |
61 |
| - |
62 |
| -###### [4.5] - 2018-11-20 |
63 |
| -- New lib codes based on Windy client `v16.17.0` |
64 |
| -- Updated menu on the right side to contain all the available layers. |
65 |
| -- Map selector was renamed to `#map-container` so make sure it will be compatible with your code. |
66 |
| - |
67 |
| -###### [4.4] - 2018-10-05 |
68 |
| -- New API conditions |
69 |
| - |
70 |
| -###### [4.0] - 2018-07-30 |
71 |
| -- Leaflet and Windy library based on Leaflet `v0.7.7` and based on Windy Client `v15.15.1` |
72 |
| - |
73 |
| -###### [3.0] - 2017-2018 |
74 |
| -- Windy API as easy to use console, using `iframe` and requires all apps to run on `mywindy.com` domain. |
75 |
| - |
76 |
| -###### [2.3] - 2016-11-18 |
77 |
| -- Fixed bug after changing URL from `windyty.com` to `windytv.com` |
78 |
| - |
79 |
| -###### [2.2] - 2016-06-01 |
80 |
| -- boot.js now run on https |
81 |
| - |
82 |
| -###### [2.1] - 2016-06-01 |
83 |
| -- Increased size of typed arrays storage to handle retina displays |
84 |
| - |
85 |
| -###### [2.0] - 2016-04-15 |
86 |
| -- Completely new version of API based on new Windyty 6.X.X codes |
87 |
| - |
0 commit comments