Copyright © 2012 Krystof Celba [email protected]
Example use:
GPXParser *gpxParser = [[GPXParser alloc] initWithGPXFile:@"AirSpace.gpx"]; NSArray *airSpace = [gpxParser getTracks]; [mapView addOverlays:airSpace];
And in - (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id <MKOverlay>)overlay :
- (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id <MKOverlay>)overlay { MKPolylineView *polylineView = [[MKPolylineView alloc] initWithPolyline:overlay]; polylineView.strokeColor = ((GPXTrackPolyLine *)overlay).color; polylineView.lineWidth = 1.5; return polylineView; }