=== Map 4 Me ===
Contributors: yewaung
Tags: map, openstreetmap, leaflet, location, store locator
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Free maps with Leaflet and OpenStreetMap for any post type, with place search, clusters, shortcodes and Elementor.

== Description ==

Free maps with Leaflet 1.9.4 (bundled, BSD-2 licence, assets/vendor/leaflet) and
OpenStreetMap tiles, or any XYZ tile service (Settings > Map 4 Me).

* [map4me source="directory" type="place" category="" location="" height="460"]
* Plugins add sources with the map4me_points filter, options with map4me_options.
* Maps build only when they scroll into view (or after a click, if set), so a
  page without a visible map requests no tiles.
* Nearby markers are grouped; popups show photo, rating and a link.
* "Show my location" uses the browser only; nothing is sent to the site.
* Editors: any <input class="m4m-geo-input"> gets a map picker with address
  lookup (OpenStreetMap Nominatim: on click only, 1 per second site-wide,
  cached 30 days, identifying User-Agent, no autocomplete).

Policies: https://operations.osmfoundation.org/policies/tiles/ and
https://operations.osmfoundation.org/policies/nominatim/

= Any post type (Settings > Map 4 Me > Post types) =
Works with post types from CPT UI and other plugins. Location sources:
* Map 4 Me location box: address search, click on the map, or paste a
  Google Maps / OpenStreetMap / Apple Maps link (short share links too).
* ACF Google Map field.
* Two custom fields (latitude, longitude).
* One custom field holding "lat, lng" or a map link.
Plugins can supply their own locations with the m4m_post_location and
m4m_post_point filters (Directory 4 Me and Event 4 Me do).

Shortcodes (generator in Settings > Map 4 Me > Shortcodes):
* [map4me post_type="clinic,listing" taxonomy="" terms="" limit="300" search="yes"]
* [map4me_here height="280" zoom="15"]  the current post's location
Option per post type: add a map under the content automatically.

= Search on maps =
Visitors search the map's own places (in the browser, free). If nothing
matches, an address lookup runs through the site (Nominatim, cached 30 days,
caps per visitor and per day in Settings > Map 4 Me > Search).

== Installation ==

1. Upload the `map4me` folder to `/wp-content/plugins/`, or install the ZIP in Plugins > Add New > Upload.
2. Activate the plugin.
3. In TheStickPress > Map 4 Me > Post types, tick the content that can be on maps.
4. Set a location in the Location box of a post, and add [map4me] to a page.

== Frequently Asked Questions ==

= Do I need a Google Maps API key? =

No. Maps use OpenStreetMap, free and without a key.

= Can I use my own map style? =

Yes: set a tile address (and its attribution) in TheStickPress > Map 4 Me > General.

== External services ==

Map pictures (tiles) are loaded by the visitor's browser from the OpenStreetMap tile servers (tile.openstreetmap.org), or from the tile address you set; this sends the visitor's IP address to that server. OpenStreetMap tile usage policy: https://operations.osmfoundation.org/policies/tiles/ , privacy: https://osmfoundation.org/wiki/Privacy_Policy . Maps can wait for a click before loading (setting "When maps load").

Address search (when switched on, and in the editor's location box) sends the typed address from your server to OpenStreetMap Nominatim (nominatim.openstreetmap.org); results are cached and limited to one request per second. Policy: https://operations.osmfoundation.org/policies/nominatim/ .

When you paste a Google Maps short link (maps.app.goo.gl) in the editor, your server asks Google once for the full link to read the position from it. Google privacy policy: https://policies.google.com/privacy .

== Screenshots ==

1. A map of listings with clusters, free with OpenStreetMap.
2. Choose which content can be on maps and where its location comes from.
3. Map settings: map pictures, starting view and when maps load.

== Changelog ==


= 1.4.0 =
* Changed: all code names now start with map4me_ instead of the short m4m_, so they cannot clash with other plugins (WordPress.org asks for this). Your settings move to the new names on their own; saved locations are unchanged.
= 1.3.0 =
* Shared TheStickPress look in the dashboard: the same lime and ink colours, cards, switches and buttons as the other 4 Me plugins.
* Every screen starts with a short card that says what it is for and the steps to follow.
* "You have unsaved changes" bar with Save and Discard on settings pages, and a warning before leaving with unsaved changes.

= 1.2.0 =
* Marker icons "user" and "building" for any directory.
* Works in any theme: sizes include padding even when the theme does not set box-sizing (found on Twenty Twenty-Five).
* New 4ME icon (TheStickPress family) in assets/brand (SVG, 128 and 256 px) and on the TheStickPress overview.

= 1.1.0 =
* Shared "TheStickPress" admin menu: the settings are now under TheStickPress (old addresses redirect).
* Coding standards: class file names follow WordPress rules.

== Upgrade Notice ==


= 1.4.0 =
Code names now use the full map4me_ prefix. Settings move automatically.
= 1.3.0 =
Part of the 4 Me family by TheStickPress. See the changelog for what is new.
