【发布时间】:2014-12-08 04:42:13
【问题描述】:
如何使用 RShape 显示路径?
我想做实时跟踪器和绘制旅行线。
- (RMMapLayer *)mapView:(RMMapView *)mapView layerForAnnotation:(KRRMAnnotation *)annotation
{
if (annotation.isUserLocationAnnotation)
return nil;
KRCalloutView *calloutView = [[[UINib nibWithNibName:@"KRRMCalloutView" bundle:nil] instantiateWithOwner:self options:nil] lastObject];
calloutView.maxTitleLabelWidth = 250.0f;
[calloutView setTitle:annotation.placeModel.title withAttributes:[KRStyleUtilities mapViewCalloutTextAttributes]];
KRRMMarker *marker = [[KRRMMarker alloc]initWithUIImage:annotation.placeModel.pinImage andContentView:calloutView inMapView:mapView];
marker.delegate = self.markerDelegateHandler;
marker.cornerRadius = 10.0f;
marker.correctCalloutPositionEnabled = YES;
marker.canShowCallout = NO;
return marker;
}
【问题讨论】: