=== Weather Map ===

Contributors: sylvie9
Donate link: https://ko-fi.com/sylvie9
Tags: weather, map, OpenWeatherMap, shortcode, api
Requires at least: 5.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display weather data for multiple coordinates using OpenWeatherMap, with caching and shortcode support.

== Description ==

Weather Map allows you to display real-time weather information for multiple coordinates using OpenWeatherMap API. Each location's weather is fetched and displayed on an interactive map (Leaflet.js based). The plugin includes a 15-minute caching mechanism to reduce API usage.

Features:
- Enter up to 6 coordinates to keep the map readable.
- Built-in API key validator before saving.
- 15-minute transient cache for weather data.
- Fully shortcode-based integration: `[weather_map]`.
- Admin-friendly settings interface.

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/weather-map/` directory.
2. Activate the plugin via the "Plugins" menu in WordPress.
3. Go to "Weather Map" in the admin menu.
4. Enter your OpenWeatherMap API key and up to 6 coordinate pairs.
5. Use the `[weathermap]` shortcode on any page or post.

== Frequently Asked Questions ==

= How do I get an API key? =
You can register for a free or paid API key at https://openweathermap.org/api. Choose a plan based on your expected usage.

= How is API usage calculated? =
Each coordinate results in one API call. So if you have 4 coordinates and load the page, that’s 4 API requests. Caching prevents duplicate calls within a 15-minute window.

= How many coordinates can I enter? =
To keep the map clean, a maximum of 6 coordinates is recommended.

= How do I display the map on a page? =
Simply use the shortcode `[weather_map]` in your content editor or page builder.


== External Services ==

This plugin connects to the OpenWeatherMap API to retrieve real-time weather information for the locations configured in the plugin settings.

Data Sent:
- Latitude and longitude values entered by the site admin
- The API key provided by the site admin in the plugin settings

Data is sent only when:
- The front-end map loads to fetch and display weather data for a specific location

Service Provider:
- [OpenWeatherMap](https://openweathermap.org/)
- [Terms of Service](https://openweathermap.org/terms)
- [Privacy Policy](https://openweathermap.org/privacy-policy)


== Changelog ==

= 1.0 =
* Initial release of the Weather Map plugin with Leaflet.js, OpenWeatherMap integration, admin settings, validation, and caching.

== Upgrade Notice ==

= 1.0 =
Initial stable version. Please ensure API key and coordinates are properly configured.

== Screenshots ==

1. Frontend display: Click the weather icon to show current weather information.
2. Plugin settings page: Enter your API key and location coordinates in the admin panel.


