i m droping pin for current location.And also i want to drop another pin after some interval usin开发者_如何学JAVAg another coordinates.Then drawing a polyline between current pin and last pin.How to do this.Help..!!!! Thanks
You should use NSThread or sleep method to make some delay, you can add the annotation by,
[self.mapView addAnnotation:annotation];
Here is the sample code for drawing lines in MKMapView.
Once an annotation pin is added to map view, it will send a delegate event which you can handle by implementing
- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views
In the above method, create some timer which will drop your next pin. I didn't understand what do you mean by "polyline". If you have to draw a line, implement drawRect in your custom map view class.
精彩评论