MapMarker

class MapMarker(var facilityId: Int = 0, var isPrimary: Boolean = false, var verified: Boolean = false, var name: String? = null, var address: String? = null, var city: String? = null, var state: String? = null, var phone: String? = null, var latitude: Double? = null, var longitude: Double? = null, var logoUrl: String? = null)

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)")
}
}

Constructors

Link copied to clipboard
constructor(facilityId: Int = 0, isPrimary: Boolean = false, verified: Boolean = false, name: String? = null, address: String? = null, city: String? = null, state: String? = null, phone: String? = null, latitude: Double? = null, longitude: Double? = null, logoUrl: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
var city: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var name: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String