Map Marker
MapMarker — lightweight representation of a com.advantahealth.api.facilities.model.Facility for map and search views.
Returned by com.advantahealth.api.map.Map.getNearbyFacilities and com.advantahealth.api.map.Map.getFacilitiesByViewPort. Unlike com.advantahealth.api.facilities.model.Facility, which contains detailed membership/verification info, MapMarker is optimized for display on maps and quick lookups.
Properties
facilityId Unique identifier of the facility.
isPrimary Whether this facility is set as the member’s primary installation.
verified Whether the facility is verified (
true) or blacklisted (false).name Display name of the facility.
address Physical address.
city City of the facility.
state State of the facility.
phone Optional contact phone number.
latitude, longitude Geographic coordinates for map placement.
logoUrl Logo of the facility (URL string).
Notes
Use isPrimary to highlight the member’s main facility on maps.
verified can be used to visually distinguish trusted vs. blacklisted facilities.
Designed for map pins, not detailed facility editing.
Android (Kotlin) — rendering nearby markers
lifecycleScope.launch {
try {
val markers = AFCore.map().getNearbyFacilities(32.7, -117.1)
markers.forEach { marker ->
println("Marker: ${marker?.name} at ${marker?.latitude},${marker?.longitude}")
}
} catch (t: Throwable) {
showError("Failed to load markers: ${t.message}")
}
}iOS (Swift) — rendering markers on a map
Task {
do {
let markers = try await AFCore.shared.map().getNearbyFacilities(latitude: 32.7, longitude: -117.1)
for marker in markers {
print("Marker: \\(marker?.name ?? "-") at \\(marker?.latitude ?? 0),\\(marker?.longitude ?? 0)")
}
} catch {
print("Failed to fetch markers: \\(error.localizedDescription)")
}
}