我使用<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
<input type="checkbox" data-toggle="toggle" data-style="ios" data-size="normal" data-on="​" data-off="​" class="switch switch-on toggle" checked value="true" id="toggle1">
<input type="checkbox" data-toggle="toggle" data-style="ios" data-size="normal" data-on="​" data-off="​" class="switch switch-off toggle" id="toggle2">
&#39;在我的代码中配置百度地图并在视图中显示地图。
如何在百度地图中设置当前位置的标记并更改相机位置?
//现在我解决了如何设置标记,但实际上我的相机位置没有移动。
pod 'BaiduMapKit
答案 0 :(得分:2)
CLLocationCoordinate2D coor;
coor.latitude = 22.2593;
coor.longitude = 70.7777;
mapView.centerCoordinate = coor
尝试此操作来更改相机
答案 1 :(得分:1)
你在这里
- (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;
}