{"_id":"@almamigratoria/leaflet-openmeteo","name":"@almamigratoria/leaflet-openmeteo","dist-tags":{"latest":"0.3.1"},"versions":{"0.3.1":{"name":"@almamigratoria/leaflet-openmeteo","version":"0.3.1","description":"Weather control for Leaflet v2","keywords":["Leaflet","Control","Weather"],"homepage":"https://github.com/almamigratoria-netizen/Leaflet-OpenMeteo#readme","bugs":{"url":"https://github.com/almamigratoria-netizen/Leaflet-OpenMeteo/issues"},"repository":{"type":"git","url":"git+https://github.com/almamigratoria-netizen/Leaflet-OpenMeteo.git"},"license":"MIT","author":{"name":"Alma Migratoria"},"type":"module","main":"dist/OpenMeteo.min.mjs","scripts":{"build":"npm-run-all lint minify","minify":"terser OpenMeteo.mjs --module -c -m --output dist/js/OpenMeteo.min.mjs","lint":"node node_modules/jshint/bin/jshint OpenMeteo.mjs"},"devDependencies":{"jshint":"^2.13.6","npm-run-all":"^4.1.5","terser":"^5.44.0"},"jshintConfig":{"esversion":11},"gitHead":"0d4c43c07c59beebf49d0017bcfe8cf238064acb","_id":"@almamigratoria/leaflet-openmeteo@0.3.1","_nodeVersion":"22.19.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-HUxLqYVnkvPnQFzPYTFFEQpnNt/eQSHIQi0K5vWCWvFpZtupDeP8nv7z4MXc3JKBJqX2ta0wRT2booHNzaeqIA==","shasum":"2b9b91ff2795e98a1514c8cf77e1cb7e07d3bda4","tarball":"https://registry.npmjs.org/@almamigratoria/leaflet-openmeteo/-/leaflet-openmeteo-0.3.1.tgz","fileCount":6,"unpackedSize":245371,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDIsZ35kpbTRfa7j6KROVNFCE3GNVfW+0c6OMJ8+bC4EwIhAK2Bz4jeJbw5G4UdX7qrOSrA1eRGtEZyyM/7f3uQbdBB"}]},"_npmUser":{"name":"almamigratoria","email":"almamigratoria@gmail.com"},"directories":{},"maintainers":[{"name":"almamigratoria","email":"almamigratoria@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/leaflet-openmeteo_0.3.1_1761950621506_0.5087324884774678"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-31T22:43:41.390Z","0.3.1":"2025-10-31T22:43:41.771Z","modified":"2025-10-31T22:43:42.045Z"},"maintainers":[{"name":"almamigratoria","email":"almamigratoria@gmail.com"}],"description":"Weather control for Leaflet v2","homepage":"https://github.com/almamigratoria-netizen/Leaflet-OpenMeteo#readme","keywords":["Leaflet","Control","Weather"],"repository":{"type":"git","url":"git+https://github.com/almamigratoria-netizen/Leaflet-OpenMeteo.git"},"author":{"name":"Alma Migratoria"},"bugs":{"url":"https://github.com/almamigratoria-netizen/Leaflet-OpenMeteo/issues"},"license":"MIT","readme":"# Leaflet.OpenMeteo\nA [leaflet](https://leafletjs.com) plugin to display weather using\nthe [Open-Meteo API](https://www.open-meteo.com).  It was inspired by\nthe [ Leaflet.Weather ](https://github.com/oskosk/Leaflet.Weather) plugin.  \nPrimary differences are that Leaflet.OpenMeteo has no dependancies \n(no JQuery), the Open-Meteo api doesn't require an API key (for non-\ncommerial use), and (hopefully) will be Leaflet version 2 compatible. \n\n[<img src=\"screenshot.png\">](./screenshot.png)\n<br/>\n[Live Demo](https://almamigratoria-netizen.github.io/Leaflet.OpenMeteo/)\n\n## Example\n``` javascript\n    // Create a map in the \"map\" div, set the view to Berlin\n     map = new L.Map('map').setView([52.5, 13.4], 13);\n\n    // add an OpenStreetMap tile layer\n    new L.TileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map);\n\n    // add the weather control that displays the weather at the center of the map\n    new L.Control.OpenMeteo().addTo(map);\n\n    // You can add multiple instances.\n    // Add a control for London\n    new L.Control.OpenMeteo({\n        title: \"London\",\n        center: [51.5, -0.1],\n    }).addTo(map);\n```\n\n## Installation\nJust include the JS in your HTML.  The CSS is in the javascript file.  The method used to inject the CSS might (or might not) work on non-evergreen browsers.\n```html\n    <script src=\"Leaflet.OpenMeteo.min.js\"></script>\n```\n\n### Options\n* `position` - Leaflet [position option](https://leafletjs.com/reference.html#control-position) for Controls.\n* `title` - Title for control.  Defaults to \"OpenMeteo\".  Useful when creating multiple instances.\n* `autoTitle` - Looks up a place name using OSM.\n* `location` - Not to be confused with `position`, this is the lat/lng from where you want the weather.  Defaults to the center of the map.  Useful when creating multiple instances.\n* `wind_directions` - options are:\n  * if undefined or ommitted, wind direction displayed in degrees\n  * an array of strings representing evenly spaced directions (starting at north, rotating clockwise).  You can use this to get directons like \"NNE\", or things like `[\"Βορέας\", \"Εὖρος\", \"Νότος\", \"Ζέφυρος\"]` if you're an ancient Greek sailor.\n  * `default` - a pre-defined array `[ \"N\", \"NE\", \"E\", \"SE\", \"S\", \"SW\", \"W\", \"NW\" ]`\n\n## Weird design choices\n* The cool kids these days say \"don't use webfonts, use SVG's\".  I'm not sure I agree, but I'm trying it out in this project.  Turns out I've got a lot to learn about how to use SVG's, but I'll get there.  Feel free to tweak it.\n* Putting the CSS right in the javascript file and using [adoptedStyleSheets](https://caniuse.com/?search=adoptedStyleSheets).  Only one file to load or customize, and Leaflet version 2 doesn't plan to support broken browsers, so this seemed like the way to go.\n\n## License\nThe Leaflet.OpenMeteo plugin is released under the [MIT License](https://opensource.org/license/mit)<br/>\nThe [Open-Meteo API](https://open-meteo.com/en/pricing) has a tiered license, which you should check out if you plan on deploying this plugin in a commerical setting.\n","readmeFilename":"README.md","_rev":"1-dcd1483d31646de484cdf7e2c786154e"}