Skip to content

Instantly share code, notes, and snippets.

@davidleandro
Last active January 25, 2023 01:18
Show Gist options
  • Save davidleandro/bcd9649d5707897e83a6a173763816d6 to your computer and use it in GitHub Desktop.
Save davidleandro/bcd9649d5707897e83a6a173763816d6 to your computer and use it in GitHub Desktop.
script.js
const options = {
// Required: API key
key: 'PsLAtXpsPTZexBwUkO7Mx5I', // REPLACE WITH YOUR KEY !!!
// Put additional console output
verbose: true,
// Optional: Initial state of the map
lat: 50.4,
lon: 14.3,
zoom: 5,
};
alert("OK!");
console.log(windyInit, L);
debugger;
// Initialize Windy API
windyInit(options, windyAPI => {
// windyAPI is ready, and contain 'map', 'store',
// 'picker' and other usefull stuff
const { map } = windyAPI;
// .map is instance of Leaflet map
L.popup()
.setLatLng([50.4, 14.3])
.setContent('Hello World')
.openOn(map);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment