我使用pod 'BaiduMapKit在代码中配置百度地图,并在视图中显示地图。如何设置一个标记在我目前的位置在百度地图和改变相机的位置也?
//现在我解决了如何设置标记,但实际上我的相机位置没有移动。
- (void)viewDidLoad {
[super viewDidLoad];
anotation = [[BMKPointAnnotation alloc]init];
CLLocationCoordinate2D coor;
coor.latitude = 22.2593;
coor.longitude = 70.7777;
anotation.coordinate = coor;
anotation.title = @"this is rajkot";
[mapView addAnnotation:anotation];
mapView.delegate = self;
}发布于 2017-03-21 09:34:48
CLLocationCoordinate2D coor;
coor.latitude = 22.2593;
coor.longitude = 70.7777;
mapView.centerCoordinate = coor试试这个来换相机
发布于 2017-04-19 11:51:32
给你
- (void)viewDidLoad {
[super viewDidLoad];
anotation = [[BMKPointAnnotation alloc]init];
CLLocationCoordinate2D coor;
coor.latitude = 22.2593;
coor.longitude = 70.7777;
anotation.coordinate = coor;
anotation.title = @"this is rajkot";
[mapView addAnnotation:anotation];
mapView.centerCoordinate = coor;
mapView.delegate = self;
}https://stackoverflow.com/questions/42830253
复制相似问题