AdvancedLocationFilter

data class AdvancedLocationFilter(val categoryCodes: List<String> = emptyList(), val categoryIds: List<Int> = emptyList(), val includeChildCategories: Boolean = true, val typeCodes: List<String> = emptyList(), val typeIds: List<Int> = emptyList(), val amenities: List<String> = emptyList(), val amenitiesMode: String = "any", val status: List<String> = emptyList(), val favoritesOnly: Boolean = false, val excludeMuted: Boolean = false, val query: String? = null, val limit: Int = 200)

The filter block shared by Locations.getLocationsByViewPort and Locations.getLocationsByRadius.

It is one object rather than twelve parameters because Kotlin default arguments do not cross into Swift: as loose parameters every iOS map fetch would have to pass all of them positionally. Construct it once, name only what you are changing, and reuse it between the two routes.

Every list filter is sent as one comma-separated value and an empty list is omitted from the request entirely - an empty value parses server-side as a single empty element and matches nothing.

Android (Kotlin)

val filter = AdvancedLocationFilter(categoryCodes = listOf("FITNESS"), limit = 100)
val page = AFCore.locations().getLocationsByRadius(lat, lng, radiusMiles = 10.0, filter = filter)

iOS (Swift)

let filter = AdvancedLocationFilter(
categoryCodes: ["FITNESS"], categoryIds: [], includeChildCategories: true,
typeCodes: [], typeIds: [], amenities: [], amenitiesMode: "any", status: [],
favoritesOnly: false, excludeMuted: false, query: nil, limit: 100
)
let page = try await AFCore.shared.locations()
.getLocationsByRadius(centerLatitude: lat, centerLongitude: lng, radiusMiles: 10, filter: filter)

Constructors

Link copied to clipboard
constructor(categoryCodes: List<String> = emptyList(), categoryIds: List<Int> = emptyList(), includeChildCategories: Boolean = true, typeCodes: List<String> = emptyList(), typeIds: List<Int> = emptyList(), amenities: List<String> = emptyList(), amenitiesMode: String = "any", status: List<String> = emptyList(), favoritesOnly: Boolean = false, excludeMuted: Boolean = false, query: String? = null, limit: Int = 200)

Properties

Link copied to clipboard

Amenity codes to filter by; empty means no filter.

Link copied to clipboard

"any" (default) or "all" - how amenities combine.

Link copied to clipboard

Category codes to filter by; empty means no filter.

Link copied to clipboard

Category ids to filter by; empty means no filter.

Link copied to clipboard

Whether to omit locations the member has muted. Defaults to false, matching the server: a muted location stays on the map so it can be drawn distinctly and re-added, instead of silently vanishing. The map routes currently ignore true and always return muted locations, so filter on LocationMarker.isMuted client-side when they must be hidden.

Link copied to clipboard

Whether to return only the member's favorites.

Link copied to clipboard

Whether a category filter also matches its child categories.

Link copied to clipboard
val limit: Int

Maximum markers to return; the server reports LocationsPage.truncated when more matched than were returned.

Link copied to clipboard

Optional free-text filter on the marker name.

Link copied to clipboard

Location status values to filter by, such as "Active" - the server's own status strings, the kind LocationMarker.status reports. Sent as one comma-separated value; empty means no filter.

Link copied to clipboard

Location type codes to filter by; empty means no filter.

Link copied to clipboard

Location type ids to filter by; empty means no filter.