Last active
January 25, 2023 01:18
-
-
Save davidleandro/bcd9649d5707897e83a6a173763816d6 to your computer and use it in GitHub Desktop.
script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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