This project is Model and API Loader realization for transit.in.ua website. Using it's methods you can load GPS coordinates of minibuses on the routes in some cities of Ukraine.
Includes testing code and demo project.
PTDummyVehiclesOnRouteLoaderDelegate *delegate = [[PTDummyVehiclesOnRouteLoaderDelegate alloc] init];
PTVehiclesOnRouteLoader *loader = [[PTVehiclesOnRouteLoader alloc] initWithCity:PTCityDnepropetrovsk vehicleType:PTVehicleTypeTaxi routeIdentifier:@"101" delegate:delegate];
[loader startSyncronously];
if (delegate.error)
{
NSLog(@"%@", delegate.error.localizedDesctiption);
} else
{
for (int i = 0; i < delegate.vehiclesOnRoute.count; i++)
{
PTVehicle *vehicle = [delegate.vehiclesOnRoute vehicleAtIndex:0];
NSLog(@"%@", Info: vehicle.title);
NSLog(@"lat&long:%f; %f", vehicle.coordinate.latitude, vehicle.coordinate.longitude);
}
}
[loader release];
[delegate release];
- Clone the repository
git clone git://github.com/deniskrut/TransitModel.git
cd TransitModel
git submodule init
git submodule update
- Add
TransitModel
as subproject to your project - Add
TransitModel
as target dependency - Link with following:
CoreLocation
,MapKit
,Foundation
,libTransitModel
Please feel free to report any errors you see or contact me.
Follow @deniskrut on Twitter.