=== Global Dual Store Locator ===
Contributors: codex
Tags: store locator, google maps, baidu maps, china, retailers
Requires at least: 6.4
Requires PHP: 7.4
Stable tag: 0.2.1

A reusable retailer locator for international and mainland-China visitors.

== Installation ==

1. Upload and activate Global Dual Store Locator.
2. Open Settings > Global Store Locator.
3. Add a browser-restricted Google Maps JavaScript API key and Baidu Maps JavaScript API AK.
4. Add stores under Store Locations. Coordinates must be WGS84.
5. Insert [global_store_locator] in Gutenberg, Elementor Shortcode, or the classic editor.

== How provider selection works ==

* Mainland China requests use Baidu Maps. The plugin first checks a trusted country header, then uses a short, cached server-side IP-country lookup when the host supplies no country header.
* Other and unknown locations default to Google Maps.
* Visitors can switch providers manually; their choice is stored in localStorage.
* Only the selected SDK is loaded.
* If Google fails or times out, the plugin attempts Baidu Maps.
* The server-rendered store list remains accessible when either map is unavailable.
* The initial map view fits all visible locations. Hovering or focusing a retailer card briefly bounces its map marker; clicking opens that location.

== Store data ==

Maintain a single Store Locations list. Store coordinates are saved as WGS84. The browser converts WGS84 to BD-09 for Baidu Maps. Spot-check important stores before production launch.

== Elementor ==

Drag Elementor's Shortcode widget onto a page and enter:

[global_store_locator]

The locator inherits common theme colors and container sizing. Its frontend CSS is scoped to .gdsl.

== API security ==

Restrict the Google key to the Maps JavaScript API and allowed HTTP referrers. Restrict the Baidu AK to Browser-side usage and allowed domains. Never put server-side secret keys into these settings.

== Demo notes ==

The included demo records use sample Hong Kong locations and phone numbers. Replace them before production use.
