Advanced Location Filter
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
Properties
"any" (default) or "all" - how amenities combine.
Category codes to filter by; empty means no filter.
Category ids to filter by; empty means no filter.
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.
Whether to return only the member's favorites.
Whether a category filter also matches its child categories.
Maximum markers to return; the server reports LocationsPage.truncated when more matched than were returned.
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.