2012-02-26 57 views
1

我有一個固定的經度和緯度,所以我使用它並在pinview中使用mapview。現在我想要當前位置和繪製路線,所以我認爲使用GPS我可以獲得經緯度。使用這個位置(緯度&經度),我必須繪製一條具有我的固定值(緯度&經度)的路線。這怎麼可能..?這是做到這一點的正確方法嗎? ?如何繪製兩點的路線..?全球定位系統(GPS)並繪製iPhone中的MapRoutet

我已經使用了委託方法,但它不叫,

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation 
      fromLocation:(CLLocation *)oldLocation 
{ 
    [manager stopUpdatingHeading]; 

    NSLog(@"latitude=%f",newLocation.coordinate.latitude); 

    NSLog(@"longitude=%f",newLocation.coordinate.longitude); 
} 

回答