2011-09-06 80 views

回答

2

試試這個代碼

strUrl = [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%f,%f&daddr=%f,%f",[app.strLat floatValue],[app.strLng floatValue],[app.strDestinationLat floatValue],[app.strDestinationLng floatValue]];  
    [strUrl retain]; 
    //[email protected]"http://maps.google.com/mapssaddr=23.032979,72.497921&daddr=25.027923,74.482643"; 
    NSURL *urlTemp =[NSURL URLWithString:strUrl]; 
    NSURLRequest *reqUrl = [NSURLRequest requestWithURL:urlTemp]; 
    [web loadRequest:reqUrl];