Location Sharing
Messages can carry a location — a place on a map, sent into a conversation like any other attachment. The sender opens a picker, drops a pin or searches for a place, and the conversation shows an address card with an optional map preview and an Open link.
It is off by default. Nothing appears in the attachment menu until you turn it on.
What it adds#
- A Share location entry in the attachment menu
- A map picker with place search, nearby suggestions and a "use my current location" button
- Coordinate rounding, so a pin can say which area someone is in rather than which building
- Role restrictions on who may share one
- A map preview inside the message, and an Open link to OpenStreetMap, Google Maps or Apple Maps
- Swappable providers — the map tiles, the geocoder and the nearby-places service are all configurable
How to enable#
WP Admin → Better Messages → Settings → Location.
Location Sharing#
| Setting | What it does | Default |
|---|---|---|
| Location Sharing | Adds Share location to the attachment menu | Off |
| Restricted Roles | These roles cannot share a location. Locations they already sent stay visible | None |
| Coordinate Precision | Rounds the coordinates before they are stored: Exact position, or rounded to about 10 m, 100 m or 1 km | Exact position |
Location Picker#
What the sender gets when they open Share location. The map is always there. Everything below can be switched off, and with both the search field and the suggestions off the picker becomes map-only.
| Setting | What it does | Default |
|---|---|---|
| Use My Current Location | Shows the button that asks the browser for the visitor's position. The browser still asks the visitor for permission | On |
| High Accuracy | Asks the device for its most precise fix, which uses GPS on phones. Off is faster, uses less battery, and is accurate to roughly a city block | On |
| Place Search | The field that looks up an address or place by name | On |
| Nearby Suggestions | Lists real places around the pin before anything is typed, nearest first, refreshing as the map moves | On |
| Nearby Radius | How far around the pin to look, in metres. A city centre is busy at 300. A village needs 1000 or more | 400 |
| Results Per Place List | How many places a search or nearby list may return (1–40) | 8 |
| Opening Zoom | Zoom the picker opens at — 1 is the whole world, 19 a single building | 14 |
| Zoom On Selection | Zoom the map moves to once a place is picked or the position is found | 16 |
| Starting Point | Where the map opens for someone who has not moved it and has not shared their position. Set it near your audience | 48.85, 2.35 |
Shared Locations#
How a location already sent appears in the conversation. These also apply to locations shared before the feature was switched off.
| Setting | What it does | Default |
|---|---|---|
| Map Preview | Draws a small map above the address. With it off the message is just the address card, and reading a conversation costs no tile requests | On |
| Preview Zoom | Zoom level of that preview map | 15 |
| Open In | Where the Open link takes the reader: OpenStreetMap, Google Maps or Apple Maps | OpenStreetMap |
Map provider#
Maps are drawn with Leaflet from a raster tile server, places are looked up by name through a Nominatim geocoder, and nearby places come from an Overpass endpoint.
All three default to the free OpenStreetMap services, which are meant for light traffic and ask for attribution.
The public OpenStreetMap services are not intended to carry a production community's traffic. Point these at your own servers, or at a commercial provider, before a launch.
| Setting | What it does |
|---|---|
| Tile URL | Template of the raster tile server. {z}, {x} and {y} are replaced with the tile coordinates. A commercial provider usually wants an access token appended |
| Attribution | Credit printed in the corner of every map. Tile providers require this, and a link is allowed |
| Maximum Zoom | Deepest zoom your tile server provides. Past it the map goes blank, so match it to what the provider serves |
| Geocoder URL | Base address of a Nominatim server, used to search places by name and to name the spot under the pin |
| Nearby Places URL | Overpass API endpoint. This is the one that answers "what is around this point", which a geocoder cannot do |
Frequently asked questions#
Does it track anyone?#
No. Nothing is shared until the sender opens the picker and sends a message, and the browser asks its own permission before revealing a position. A location is a message, not a live feed.
Can I stop exact addresses being sent?#
Yes — Coordinate Precision rounds the coordinates before they are stored. At about 1 kilometre a pin says which neighbourhood someone is in and no more.
Can I let only some roles share a location?#
Restricted Roles lists the roles that cannot. Everyone else can, and anything already sent stays readable either way.
Does the map cost tile requests every time someone reads the conversation?#
Only with Map Preview on. Turn it off and a shared location renders as the address card alone.
See also#
- File sharing — the attachment menu the picker sits in
- Privacy & GDPR — what Better Messages stores