Return to Snippet

Revision: 26180
at April 19, 2010 19:44 by espinallab

Initial Code
- (void)showDirections {
	if ([self.address length] == 0) return;
	//We create our link to the appDelegate
	ClubPlanetControllerAppDelegate * appDelegate = (ClubPlanetControllerAppDelegate *)[UIApplication sharedApplication].delegate;

	NSURL *myURL = [NSURL URLWithString:[NSString stringWithFormat:@",%f", [self.address stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], [ floatValue], [appDelegate.lon floatValue]]];
	[[UIApplication sharedApplication] openURL:myURL];

Initial URL

Initial Description
Here is a peace of code from one of my project to show you how you to show directions on the Google Map application.

Initial Title
Show Directions on Google Map in the iPhone.

Initial Tags

Initial Language
Objective C