Advertisement
filmfer

script.js

Nov 22nd, 2024 (edited)
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.64 KB | Source Code | 0 0
  1. const options = {
  2.     // Required: API key
  3.     key: 'HIwXiNGJ1zV2P0EABJJRxzep4cjMpObc', // REPLACE WITH YOUR KEY !!!
  4.  
  5.     // Put additional console output
  6.     verbose: true,
  7.  
  8.     // Optional: Initial state of the map
  9.     lat: 50.4,
  10.     lon: 14.3,
  11.     zoom: 5,
  12. };
  13.  
  14. // Initialize Windy API
  15. windyInit(options, windyAPI => {
  16.     // windyAPI is ready, and contain 'map', 'store',
  17.     // 'picker' and other usefull stuff
  18.  
  19.     const { map } = windyAPI;
  20.     // .map is instance of Leaflet map
  21.  
  22.     L.popup()
  23.         .setLatLng([50.4, 14.3])
  24.         .setContent('Hi, I'm Filipe Fernandes, and this is my world.')
  25.        .openOn(map);
  26. });
Tags: Windy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement