我想在ios7中显示地图上2点之间的路线。 所以我有源点,但我无法理解如何使用坐标输入目的地:
MKDirectionsRequest *request = [[MKDirectionsRequest alloc] init];
request.source = [MKMapItem mapItemForCurrentLocation];
request.destination = _destination; // HERE I WANT TO ADD COORDINATES.
比我有一些位置:
CLLocation * gotopoint = [[CLLocation alloc] initWithLatitude:100.09361经度:33.85482];
如何将此点设置为目的地?
由于
答案 0 :(得分:1)
得到了它:
CLLocationCoordinate2D _srcCoord = CLLocationCoordinate2DMake(132.09361,134.854);
MKPlacemark *_srcMark = [[MKPlacemark alloc] initWithCoordinate:_srcCoord addressDictionary:nil];
MKMapItem *gotopoint= [[MKMapItem alloc] initWithPlacemark:_srcMark];