2011-04-27 4 views
-1

지도의 끝 위치 인 시작 & 사이의 경로를 표시하고 싶습니다. 전체 과정을 어떻게 할 수 있습니까? 위도가 & 경도가 올바르게 표시되지만 경로가 표시되지 않습니다.지도 경로 문제

+0

경로가 직선이나 두 지점 사이의 어떤 방향과 같은 경로입니까? – mharper

+0

두 지점 사이에서 일직선이거나 일종의 방향 일 수 있습니다. 지금 나는 두 번째 옵션 (두 점 사이의 어떤 종류의 방향)에 대한 요구 사항을 가지고있다. –

답변

1
NSString *urlstring=[NSString stringWithFormat:@"http://maps.google.com/?saddr=%f,%f&daddr=%f,%f",sourcelocation.latitude,sourcelocation.longitude,destinationlocation.latitude,destinationlocation.longitude]; 

[[UIApplication sharedApplication]openURL:[NSURL URLWithString:urlstring]];