=== AIYA Map Locator for Yandex Maps ===
Contributors: sinara2022
Tags: yandex maps, map, geolocation, store locator, branches
Requires at least: 6.0
Tested up to: 7.1
Stable tag: 0.4.55
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Yandex Maps for WordPress with a branch locator: keys, markers, constructor, Static API, lists, filters, clusters, and CSV import.

== Description ==

AIYA Map Locator puts Yandex Maps on your WordPress site for branches, contacts, pickup points, and service locations. Create maps and objects in the admin, then embed them with a shortcode, Gutenberg block, or Elementor widget.

Free has no map/object/API-key count quotas. Free has no AI services, AI credentials, or AI traffic. AI-assisted marker drafts are available only in the separate AIYA Pro plugin from the author site.

= Free features =

* Yandex Maps API keys and map language
* Map and Object post types with categories
* JavaScript API v3, Static API, and Yandex Map Constructor
* Shortcode, Gutenberg block, and Elementor widget
* Object list, name/address search, category filters, and marker clustering
* Optional Open now filter (default off): uses location hours; objects without hours or with unreadable hours stay visible
* Optional country and city filter (default off): two dropdowns from object country/city fields; the map fits the visible set
* Custom marker icons, colors, Free silhouette presets (21 styles), map theme, setup wizard, and admin preview
* Optional street panorama (default off): balloon “Street view” / «Улица» opens Yandex web panoramas at the object — a deep-link, not an in-map player
* CSV import with coordinates and API key diagnostics

= Pro (separate plugin) =

AIYA Pro adds AI marker drafts (your API key and Custom endpoint on the AI markers page; keys e.g. via https://proacton.ru/aitunnel/), address geocoding and suggestions, nearby search, routes, delivery zones, GeoJSON/KML/KMZ import-export, WooCommerce zone rates, and updates from the author site.

== Installation ==

1. Upload the plugin ZIP via Plugins → Add New → Upload Plugin, or copy the `aiya-map-locator` folder into `wp-content/plugins/`.
2. Activate **AIYA Map Locator for Yandex Maps**.
3. Get a Yandex Maps API key in the [Yandex Developer Console](https://developer.tech.yandex.ru/) and allow your site domain.
4. Open **AIYA → Settings → API keys**, save the key, and optionally run diagnostics.
5. Create **Objects** (markers) and a **Map**, then embed with the shortcode, block, or Elementor widget:

`[yms_map id="123"]`

Replace `123` with your map post ID.

== Frequently Asked Questions ==

= Does Free use AI? =

No. Free is a maps plugin with a branch locator. AI marker drafts are prepared in AIYA Pro under AIYA → AI markers (your API key and Custom endpoint; keys e.g. via https://proacton.ru/aitunnel/).

= Is there a paid version? =

Yes. AIYA Pro is a separate add-on sold on the author site. Free remains fully usable for its core map and locator features without count quotas. Pro unlocks features (zones, nearby, routes, geocoder, AI markers), not map/object quotas.

= Do I need my own Yandex API key? =

Yes. Create a key in the Yandex Developer Console and restrict it to your domain. Free does not ship a shared public key.

= Which embed methods are supported? =

Shortcode `[yms_map id="…"]`, a Gutenberg block, and an Elementor widget (when Elementor is active).

== Screenshots ==

1. Front-end branch locator: map, filters, search, and object list.
2. Admin objects list: markers, categories, and bulk management.
3. Settings: API keys, map language, defaults, and diagnostics.

== External services ==

This plugin connects to third-party services when maps are shown or when an administrator runs diagnostics. Free does not connect to AI providers or the author’s servers. Optional Pro features (geocoder, nearby, routes, delivery zones) use the same Yandex endpoints and may add address queries when those Pro modules are active with the separate AIYA Pro companion plugin.

= Yandex Maps (JavaScript API, Static API, Map Constructor, Geocoder, Suggest, Router) =

Used to render maps, markers, clustering, static fallback images, constructor embeds, and (with AIYA Pro) geocoding, address suggestions, and on-map routes. When a visitor opens a page with a map, the browser loads scripts or images from Yandex and sends your site’s API key and map parameters (center, zoom, marker coordinates, language). When an administrator runs API key diagnostics, the plugin sends a test request from the server using the saved key.

Service provider: Yandex.

* Terms of Use for Yandex Maps API services: https://yandex.ru/legal/maps_api/
* Yandex Privacy Policy: https://yandex.ru/legal/confidential/

= jsDelivr CDN (@yandex/ymaps3-clusterer) =

When marker clustering is enabled on a JavaScript API map, the browser may load the official Yandex clusterer package from jsDelivr (`cdn.jsdelivr.net`) because the Yandex JS API requires an explicit CDN registration for that package in browser builds.

Service provider: jsDelivr (open-source CDN).

* Terms of use: https://www.jsdelivr.com/terms
* Privacy policy: https://www.jsdelivr.com/privacy-policy

= OpenStreetMap Nominatim (geocoding fallback, Pro-related flows) =

If Yandex geocoding or JS Search cannot resolve a free-text address (for example when building a route, nearby search, or admin geocode with AIYA Pro), the plugin may send the address string as a last-resort HTTP GET to the public Nominatim search API at `nominatim.openstreetmap.org`. No API key is sent; only the query text and standard HTTP headers (Accept, Accept-Language). This fallback is not used for ordinary Free map display without Pro location features.

Service provider: OpenStreetMap Foundation (Nominatim).

* Usage policy: https://operations.osmfoundation.org/policies/nominatim/
* Privacy policy: https://wiki.osmfoundation.org/wiki/Privacy_Policy

== Changelog ==

= 0.4.55 =
* Optional country and city filter (off by default). Dropdowns from object country/city fields; map fits the visible set.

= 0.4.54 =
* Optional Open now filter (off by default). Uses location hours; unreadable hours stay visible.

= 0.4.53 =
* Map click emits aiya-map-click for Pro WooCommerce checkout map / embeds.

= 0.4.52 =
* Admin brand header: remove narrow hero photo; keep full-width teal wash; WP notices no longer inject inside the brand strip.

= 0.4.49 =
* WordPress.org review: document OpenStreetMap Nominatim, jsDelivr, and Yandex Geocoder in readme External services.
* Delivery zones: editor, save handler, and zone storage implementation moved to the AIYA Pro companion plugin; Free shows Pro upsell only.
* WordPress.org packaging: main plugin file renamed to `aiya-map-locator.php` (matches slug/text domain).

= 0.4.47 =
* Stable tag aligned with plugin Version / YMS_VERSION (0.4.47).

= 0.4.45 =
* Static API: zones (+ optional route) on static images / fallback.

= 0.4.42 =
* Free markers: removed Yandex-lookalike `pin` silhouette; default/alias is `circle`.
* Map core 0.1.33 sync.

= 0.4.41 =
* Map core 0.1.32: Free opt-in street panorama (showPanorama) + clustering registerCdn fix.

= 0.4.40 =
* Admin Upgrade menu uses thicker arrow-up-in-ring icon (aligned with shop theme).

= 0.4.39 =
* Harden Country/City parse: reject hours, demo blurbs, and marketing phrases as city; keep known/short localities only.

= 0.4.38 =
* Auto-fill Country/City from address when empty (preset seed, CSV, object save); Russian address parse + Pro geocode fallback.

= 0.4.37 =
* Object geography: Country and City meta fields, admin list columns (Country, City, Address).
* CSV import saves country/city when provided or returned by Pro geocoder.
* Admin geocode fills country/city fields from AJAX response.

= 0.4.36 =
* WordPress.org review: remove Free map/object/key count quotas; Pro is features-only.
* Text domain and slug alignment: aiya-map-locator; display name AIYA Map Locator for Yandex Maps.
* Admin styles via wp_add_inline_style; sanitize zones JSON before decode; External services ToS/Privacy links.

= 0.4.35 =
* Packaging and WP.org readiness polish.

= 0.4.32 =
* Free marker size S/M/L (markerSize) next to color mode.

= 0.4.30 =
* Map core 0.1.21: API script referrerPolicy = strict-origin-when-cross-origin (fixes Yandex JS API 403 when the site sends Referrer-Policy: no-referrer).

= 0.4.29 =
* Free marker styling: 21 map-core silhouette presets (3×7 picker), color swatches, single/multicolor modes, map theme.
* Per-object silhouette override; frontend payload passes markerPreset, accent, markerColorMode to map-core.
* RU/EN labels for all presets and style sections.

= 0.4.28 =
* Packaging release for directory / shop sync (Stable tag aligned with YMS_VERSION).

= 0.4.26 =
* Packaging release for directory / shop sync.

= 0.4.20 =
* Map core 0.1.14: zone tips use position:fixed + pointer clientX/Y (next to cursor).

= 0.4.19 =
* Map core 0.1.13: zone tips track cursor via screenCoordinates/clientXY; hide on leave ([hidden]+display).

= 0.4.18 =
* Map core 0.1.12: zone tips only from YMapListener coords; drop conflicting DOM mousemove that false-hit outside polygons.

= 0.4.17 =
* Map core 0.1.11: fix zone tips (YMapListener layer + (object,event) arity).
* Zone fit: height-aware pad (no forced over-zoom that clipped polygons).

= 0.4.16 =
* Map core 0.1.10: zone hover only inside polygons (trust YMaps coords; drop conflicting DOM mousemove).
* Delivery zones: deferred fit with ~1.5× larger cluster vs loose city zoom.

= 0.4.15 =
* Map appearance: light / dark / auto scheme theme (YMapDefaultSchemeLayer).
* Static API fallback layout polish when JS API fails (403 / Referer).
* Marker balloon polish (accent edge, caret, EN CTA default).

= 0.4.14 =
* Admin Brand/Help: AITUNNEL link for Pro AI keys (custom endpoint) via https://proacton.ru/aitunnel/.

= 0.4.13 =
* Admin help/diagnostics: tips on JS API free conditions, separate Geocoder/Suggest keys, and coordinate storage rules.

= 0.4.12 =
* Plugin URI and Author URI set to distinct product and author domains for wordpress.org.

= 0.4.11 =
* WordPress.org readiness: readme Installation/Screenshots, Stable tag sync, directory assets.
* Plugin naming without “with AI” for Free; header description aligned with short description.
* Packaging and i18n polish for directory submission.

= 0.4.10 =
* Admin branding: logo/hero strip, shop links, Free→Pro upsell menu and banner.
* Soft teal admin chrome for settings, wizard, import.

= 0.4.9 =
* Admin UI polish: teal AIYA accents, card sections, clearer settings/wizard/list screens.

= 0.4.8 =
* Map settings expose in-map route type (driving / walking / transit) for Pro.
* Shared aiya-map-core 0.1.1 sync (route + nearby runtime).

= 0.4.7 =
* Locator filters and list-to-marker focus work on the public map.
* Static API fallback image when JS API fails to load.

= 0.4.6 =
* Removed all AI settings, interfaces, AJAX handlers, provider integrations, and AI copy from Free.
* AI-assisted marker generation is now an AIYA Pro feature.

== Upgrade Notice ==

= 0.4.36 =
WP.org compliance: no Free count quotas; slug/text domain aiya-map-locator. No breaking changes for existing maps.

= 0.4.12 =
Plugin and Author URIs corrected for wordpress.org (distinct domains). No functional changes.

= 0.4.11 =
Stable tag and directory materials aligned for wordpress.org. No breaking changes for existing maps.
