C# Class LondonBike.BikeLocation

Stores and updates info about where the bikes are TfL have more info on the data they provide here http://www.tfl.gov.uk/businessandpartners/syndication/default.aspx this normally calls a AppEngine service which returns a pipe-seperates list, very much like baselist.txt, but it's live, coming from the TFL urls
Afficher le fichier Open project: nicwise/londonbikeapp Class Usage Examples

Méthodes publiques

Свойство Type Description
BikesAvailable int
Capacity int
DistanceFromCurrentPoint int
DocksAvailable int
Heading int
IsAvailable bool
Lat double
Long double
Name string
Touched bool
UniqueId string
devkey string
isUpdating bool

Méthodes publiques

Méthode Description
AddBike ( BikeLocation location ) : void
BikeLocation ( string dock, bool setAvailable ) : System
BikeLocation ( string name, string postcode, int capacity, double lat, double _long, bool isAvailable ) : System
BuildBikeList ( ) : void
CalculateDistanceInMeters ( CLLocationCoordinate2D source, CLLocationCoordinate2D dest ) : double
CheckBikeIds ( ) : void
Debug ( double _latSource, double _longSource, double _latDest, double _longDest ) : void
FindClosestBike ( double _lat, double _long ) : BikeLocation
FindClosestBikeList ( double _lat, double _long ) : IEnumerable
HeadingToString ( int heading ) : string
LogRoute ( ) : void
LogSearch ( ) : void
LogTrip ( int time, int distance ) : void
RemoveBike ( BikeLocation location ) : void
UpdateFromWebsite ( NSAction onDone ) : bool
WriteToPersistentFile ( ) : void

Private Methods

Méthode Description
CalculateDistance ( double _latSource, double _longSource, double _latDest, double _longDest ) : double
CalculateHeading ( double _latSource, double _longSource, double _latDest, double _longDest ) : double
ToDeg ( double rad ) : double
ToRad ( double deg ) : double

Method Details

AddBike() public static méthode

public static AddBike ( BikeLocation location ) : void
location BikeLocation
Résultat void

BikeLocation() public méthode

public BikeLocation ( string dock, bool setAvailable ) : System
dock string
setAvailable bool
Résultat System

BikeLocation() public méthode

public BikeLocation ( string name, string postcode, int capacity, double lat, double _long, bool isAvailable ) : System
name string
postcode string
capacity int
lat double
_long double
isAvailable bool
Résultat System

BuildBikeList() public static méthode

public static BuildBikeList ( ) : void
Résultat void

CalculateDistanceInMeters() public static méthode

public static CalculateDistanceInMeters ( CLLocationCoordinate2D source, CLLocationCoordinate2D dest ) : double
source CLLocationCoordinate2D
dest CLLocationCoordinate2D
Résultat double

CheckBikeIds() public static méthode

public static CheckBikeIds ( ) : void
Résultat void

Debug() public static méthode

public static Debug ( double _latSource, double _longSource, double _latDest, double _longDest ) : void
_latSource double
_longSource double
_latDest double
_longDest double
Résultat void

FindClosestBike() public static méthode

public static FindClosestBike ( double _lat, double _long ) : BikeLocation
_lat double
_long double
Résultat BikeLocation

FindClosestBikeList() public static méthode

public static FindClosestBikeList ( double _lat, double _long ) : IEnumerable
_lat double
_long double
Résultat IEnumerable

HeadingToString() public static méthode

public static HeadingToString ( int heading ) : string
heading int
Résultat string

LogRoute() public static méthode

public static LogRoute ( ) : void
Résultat void

LogSearch() public static méthode

public static LogSearch ( ) : void
Résultat void

LogTrip() public static méthode

public static LogTrip ( int time, int distance ) : void
time int
distance int
Résultat void

RemoveBike() public static méthode

public static RemoveBike ( BikeLocation location ) : void
location BikeLocation
Résultat void

UpdateFromWebsite() public static méthode

public static UpdateFromWebsite ( NSAction onDone ) : bool
onDone NSAction
Résultat bool

WriteToPersistentFile() public static méthode

public static WriteToPersistentFile ( ) : void
Résultat void

Property Details

BikesAvailable public_oe property

public int BikesAvailable
Résultat int

Capacity public_oe property

public int Capacity
Résultat int

DistanceFromCurrentPoint public_oe property

public int DistanceFromCurrentPoint
Résultat int

DocksAvailable public_oe property

public int DocksAvailable
Résultat int

Heading public_oe property

public int Heading
Résultat int

IsAvailable public_oe property

public bool IsAvailable
Résultat bool

Lat public_oe property

public double Lat
Résultat double

Long public_oe property

public double Long
Résultat double

Name public_oe property

public string Name
Résultat string

Touched public_oe property

public bool Touched
Résultat bool

UniqueId public_oe property

public string UniqueId
Résultat string

devkey public_oe static_oe property

public static string devkey
Résultat string

isUpdating public_oe static_oe property

public static bool isUpdating
Résultat bool