Metadata
| Field | Value |
|---|---|
| Article type | How-to (Admin) |
| Plugin slug | mam-geofilters |
| Applies to plugin version | 26.29.1+ |
| Category | Building Your App |
| Audience | WordPress admin |
| Estimated time | 10 minutes |
| Last verified | 2026-06-03 |
Goal
Here’s what you’re after: a home screen that opens on a sensible location, with users able to narrow what they see to a distance around themselves. By the end of this how-to, the geofilter picker will start on a default city you choose, offer a radius selector bounded by a minimum and maximum you set, and show a Near Me option that recenters on wherever the user actually is.
This builds on Recipe: Enable geofilters, which turns the picker on in the first place. Here, you’ll tune what it shows by default and how far it reaches.
Prerequisites
- WordPress admin access.
- MAM Suite installed, with
mam-mainandmam-geofiltersactivated under Mobile App Manager → Software. - Geofilters already enabled for at least one role — see Recipe: Enable geofilters. If Use GeoFilters (
tsl-use_geofilters) or Use GeoFilters Navbar Icon Only (tsl-geofilters_show_as_icon) is not yetyesfor your role, the picker won’t appear and these settings have no visible effect. - The latitude and longitude of the city you want the app to start on. You can read these off most map services (the two decimal numbers in a place’s URL or “share location” panel).
You’ll find the location, radius-range, and Near Me settings below under the GeoFilters tab in App Settings, and they’re stored per role — so different roles in the same app can start on different cities or reach different distances.
Steps
1. Open the role’s home-screen settings
Go to Mobile App Manager → App Settings and pick the role you’re configuring — for most apps, that’s mam-all. You’ll find the geofilter location and radius fields grouped under the GeoFilters tab for that role.
2. Set the default location
Before a user picks a city or grants location access, the picker needs somewhere to start. Set these three “default” fields to give it one:
| Setting | Key | What to enter |
|---|---|---|
| GeoFilter Default City Name | geofilter_default_name |
The display name shown in the picker, e.g. San Jose |
| GeoFilter Default Latitude | geofilter_default_lat |
The latitude, e.g. 37.3382 |
| GeoFilter Default Longitude | geofilter_default_lon |
The longitude, e.g. -121.8863 |
Keep all three in sync: the name is what the user reads, but the latitude/longitude pair is what actually filters the listings. A mismatch between the two is the most common reason for “the label says one city, but I’m seeing listings from somewhere else.”
Think of this as the fallback the home screen opens on. When the device has GPS and the user allows location access, the app can add a Current Location entry above your default — so the user’s real position takes priority whenever it’s available.
3. Set the default radius
Set GeoFilter Radius (Miles) (geofilter_radius) to the distance, in miles, the home screen should search on first load. Pick a value that matches how spread out your listings are:
- Tight regional app:
25–50 - Statewide app:
100–250 - National app:
500+
Leave this empty, and geofilters fall back to 25 miles by default. Whatever you set, the resolved radius is capped at 3000 miles.
4. Bound the radius selector (min and max)
The picker includes a radius selector users can drag or step through. Constrain it so they can’t pick a distance that comes back empty or floods the screen with results:
| Setting | Key | Purpose |
|---|---|---|
| GeoFilter Select Min Radius | gf_min_radius |
Smallest distance a user can choose |
| GeoFilter Select Max Radius | gf_max_radius |
Largest distance a user can choose |
Choose a min and max that bracket your default radius from step 3 — for a regional app, that might mean a min of 5 and a max of 100, with a default of 25 sitting comfortably in between.
Don’t want users touching the radius at all? Set Hide GeoFilters radius selector (geofilters_hide_radius) to yes to hide the selector entirely. The default radius from step 3 still applies — the user just can’t adjust it.
5. Decide how the Near Me filter behaves
The picker shows a Near Me button that recenters the search on wherever the user actually is, instead of the default city. It’s on by default.
- Leave it on (recommended), so users with location access see what’s around them right away.
- To remove it — for example, an app where listings are organized strictly by city — set Hide Near Me button on Home screen (
geofilters_hide_near_me) toyes.
Near Me only works if the device shares its location. If a user denies access, the app falls back to the default city you set in step 2 — which is exactly why a sensible default matters, even with Near Me turned on.
6. (Optional) Set the picker message and presentation
Two more settings, both cosmetic, round out the picker:
- Geofilter Message (
geofilters_message) — text shown in the geofilters control, useful for a short prompt like “Showing listings near you.” - Use GeoFilters Navbar Icon Only (
geofilters_show_as_icon) — covered in Recipe: Enable geofilters; controls whether the picker is inline or a compact navbar icon.
7. Save and verify
Save the role, then open the mobile app as a user in that role. Here’s what you should see:
- The picker opening on your default city’s name and listings.
- A radius selector limited to the min/max you set (unless you hid it), starting at your default radius.
- A Near Me entry (unless you hid it), which recenters on the device’s location when tapped.
If the listings don’t match the city name, double-check the latitude/longitude from step 2. If the picker doesn’t show up at all, confirm geofilters are enabled for this role (see Prerequisites).
Notes and gotchas
- Per-role, not global. Every setting above lives on the role you just edited. Repeat the steps for other roles, or lean on the settings cascade if your roles inherit from a parent.
- Mobile app override. The home screen can send its own per-request radius, and when it does, that value wins over
geofilter_radiusfor that request (still capped at3000miles). The min/max bounds you set shape what the selector is allowed to send. - Coordinates are decimal degrees. Use the plain decimal form (e.g.
37.3382,-121.8863), not degrees-minutes-seconds. Western longitudes and southern latitudes are negative. - City list vs. default city. These settings control where the picker starts and how far it reaches — the list of cities a user can switch between is handled separately, see Recipe: Manage the city list.
Related
- Recipe: Enable geofilters — turn the picker on and choose inline vs. icon.
- Recipe: Manage the city list — trim or edit the cities users can pick from.
- Plugin overview: mam-geofilters — how the feature fits together end to end.
- Hook: mam_geofilter_radius — override the resolved radius in code.
- Hook: mam_force_geofilters — override the on/off decision in code.
Verification
This article was last verified against:
- Plugin:
mam-geofiltersv26.29.1 mam-main(provides the App Settings UI and the settings cascade)- App-setting docs for
geofilter_default_lat,geofilter_default_lon,geofilter_default_name,geofilter_radius,gf_min_radius,gf_max_radius,geofilters_hide_near_me,geofilters_hide_radius,geofilters_message,geofilters_show_as_icon
Re-verify whenever the home-screen geofilter setting keys or labels change, the default radius (25) or hard cap (3000) changes, or the Near Me / radius-selector behavior changes.
