Windy API enables you to create your own Windy Apps with minimum effort. You do not need any server, and you can have your Windy App up & running in less than 5 minutes.
Once you are logged in API console at https://api.windy.com, you can create one or more Windy Apps by adding JS, CSS or HTML code to client codes of Windy.
Your published Windy App will be accessible on https://mywindy.com/your-username/name-of-your-app
.
If you want to run your Windy App on your own domain, set up your own server somewhere, and embed your Windy App inside and iframe
.
Windy API console let you edit Javascript, CSS, Head or HTML of Windy. HTML and Head content is inserted as the last element of document's body
, or head
section. Your javascript is wrapped inside (function() { ... })()
so you donot need to wrap it.
Windy javascript libraries use global object W
.
Your Javascript code, that you will write inside the editor in API console, will be launched when document is loaded, Leaflet map is initialized, and all is up and running. Instance of Leaflet map is then available as W.maps
.
2. Leaflet, markers and pupups
3. Playing with User Interface
9. Working with weather picker
10. Hosting your JS and CSS on your own server
Our examples use ES6 syntax, but there is no traspilation of Javascript code. Whatever you write, will go directlly to client's browser so use ES5 if you want to cover older browser.
Windy API is free for time being, but Windy logo must remain visible and clickable in your App. Using Windy API inside native iOS or Android apps is prohibited and requires our permission. Detailed conditions are described here
leaflet library is already loaded. We use version 0.77 and we do not plan to upgrade right now. Leaflet documentation is described here
If you want use external library (for instance jQuery
) or some Leaflet plugin just include few lines into head section of your Windy App, like this.
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js"></script>
The same philosophy can be used to host your custom JS, CSS codes on your own server.
We are very sorry but, old API v2.3 is depreciated. We keep it running on server but we will not issue new API keys for it. We have not plan to shut it from servers down.
- Change of app delivery mechanism (now whole
app.html
is rendered server side with all codes included) - CLient codes upgraded to
v12.34
- First version of Windy API launched, based on client codes
12.30