Skip to content
aferre edited this page May 30, 2011 · 4 revisions

cf Google Distance Matrix API page for the behaviour of the WS.

Install

Just copy afGMapsDistanceRequest and afGoogleMapsAPIRequest files to your project (you need both ASIHTTP and JSON frameworks for the wrapper to work).

How to use

Then, simply make your class inherit the afGoogleMapsDistanceDelegate protocol, and implement the following delegate functions:

-(void) afDistanceWSStarted:(afGMapsDistanceRequest *)ws ;

-(void) afDistanceWS:(afGMapsDistanceRequest *)ws gotDistance:(NSString *) dist;

-(void) afDistanceWSFailed:(afGMapsDistanceRequest *)ws withError:(NSString *)er;

Clone this wiki locally