Recipe: Per-neighborhood city lists

Goal

Configure a separate city list for each neighborhood within a city. After this recipe, when a user picks a neighborhood (rather than the top-level city), the app shows a list of locations scoped to that neighborhood — with its own coordinates and its own search distance.

This is an advanced setup. Most apps don’t need it. Use it when the same app serves multiple neighborhoods that meaningfully differ in which sub-locations are relevant — for example, an event app where Brooklyn neighborhoods see different venues than Queens neighborhoods.


Prerequisites

  • A working top-level city list per Recipe: Manage the city list
  • A clear list of neighborhoods you want to support (you’ll be entering them by name)
  • WP Admin access

How it works

mam-geofilters stores city lists in WordPress options. The top-level (city) list lives in tsl_gd_map_manager_cities. Each neighborhood gets its own option, prefixed with the neighborhood’s slug:

{neighborhood-slug}tsl_gd_map_manager_cities
{neighborhood-slug}tsl_gd_map_manager_distance

The slug is the neighborhood name with spaces replaced by underscores (e.g., Park_Slope). The Manage Neighborhoods admin page reads and writes those keys for whichever neighborhood you’ve selected.

The two options are paired: one holds the city list scoped to the neighborhood, the other holds the search distance for that neighborhood.


Steps

1. Open the Manage Neighborhoods page

Go to Mobile App Manager → Manage Neighborhoods.

2. Pick a neighborhood

The page opens with a Select City dropdown (the dropdown reads from your top-level cities, even though the page is for neighborhoods — historical naming, ignore it). Choose the neighborhood you want to configure. The page reloads with the editable city table beneath the dropdown.

If the neighborhood you want isn’t in the dropdown, add it as an entry on the Manage Cities page first (per Recipe: Manage the city list), then come back.

3. Edit the per-neighborhood city list

The table works the same way as the top-level Manage Cities page — Name, Latitude, Longitude, Active? columns, with one editable row per location and an empty trailing row for adding a new one.

Differences from the top-level list:

  • The list starts pre-populated from the top-level cities. You’re customizing it from there, not building it from scratch.
  • New entries you add only appear when this neighborhood is the selected scope.
  • Deactivating a row only deactivates it for this neighborhood; the top-level list is unaffected.

Save.

4. Set the per-neighborhood distance

Some MAM Suite views use a per-neighborhood search distance separate from the global radius. If your app is one of them (a pa_distance field will be visible on the page), set it now. Save.

5. Verify

Open the mobile app, navigate to the neighborhood, and confirm:

  • The list of sub-locations matches what you configured
  • The search radius (where used) matches what you set
  • Top-level cities behave the same as before — adding a neighborhood-scoped list shouldn’t change top-level behavior

Common gotchas

  • The neighborhood slug is derived from the name. Renaming the neighborhood on the Manage Cities page changes its slug, which orphans the existing per-neighborhood options. If you need to rename, plan on re-entering the per-neighborhood data afterward, or rename the option keys in the database first.
  • Spaces become underscores. A neighborhood called Park Slope produces options keyed Park_Slopetsl_gd_map_manager_cities. Underscores in the name are preserved as-is.
  • The Select City dropdown reads from tsl_gd_map_manager_cities. If a neighborhood you expect isn’t in the dropdown, the entry is missing from the top-level list, not from the neighborhood list.

Verification

This article was last verified against:

  • Plugin: mam-geofilters v2.1.1
  • WP options: tsl_gd_map_manager_cities, {slug}tsl_gd_map_manager_cities, {slug}tsl_gd_map_manager_distance

Re-verify whenever the slug derivation rule (spaces → underscores) changes, the option key prefix scheme changes, or the Manage Neighborhoods page columns change.


  • Plugin overview: mam-geofilters
  • Recipe: Enable geofilters
  • Recipe: Manage the city list
  • Hook: mam_wc_geofilters_locations
  • Hook: mam_geofilter_list

Metadata

Field Value
Article type Recipe (Admin)
Plugin slug mam-geofilters
Applies to plugin version 2.1.1+
Category Building Your App
Audience WordPress admin
Estimated time 15 minutes
Prerequisites article Recipe: Manage the city list
Last verified 2026-04-30
Contents

    Need Support?

    Can’t find the answer you’re looking for? Don’t worry we’re here to help!