fetchBusPositionsForLocation function
Fetches bus positions for a specific location.
apiKey
is your API key for the WMATA API.
latitude
is the last reported Latitude of the bus.
longitude
is the last reported Longitude of the bus.
radiusMeters
is the radius, in meters, to include in the search area.
Implementation
Future<List<BusPosition>> fetchBusPositionsForLocation(
String apiKey, {
required double latitude,
required double longitude,
required double radiusMeters,
}) async =>
await BusPositionService.fetchBusPositions(
apiKey,
lat: latitude,
lon: longitude,
radius: radiusMeters,
);