-2

我是ios开发的初学者。我需要的是我将我的起点设置为我的当前位置?

- (void)loadView {
    UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f,   372.0f)];
    self.view = contentView;


    routeMapView = [[MKMapView alloc] initWithFrame:contentView.frame];
    routeMapView.delegate = self;
    routeMapView.showsUserLocation = YES;
    [contentView addSubview:routeMapView];



    routeOverlayView = [[UICRouteOverlayMapView alloc] initWithMapView:routeMapView];

    diretions = [UICGDirections sharedDirections];
    diretions.delegate = self;

}

- (void)viewDidLoad 
{
    [super viewDidLoad];

    CLLocationCoordinate2D sOri,sDest;



    startPoint=@"";
    endPoint= @"34 Jalan Yew, 55100 Kuala Lumpur, Wilayah Persekutuan Kuala Lumpur, Malaysia";

}
4

1 回答 1

0

你可以在这里找到 MKMapView 的文档。 操作地图部分的可见部分是您正在寻找的。

于 2012-11-21T02:47:48.900 回答