一个xib有可能有两个地图视图吗?如果有可能如何在每个地图视图上显示不同的数据?我搜索了很多,但找不到任何链接。
if (myMapviewLala.tag==1) {
MKCoordinateRegion region;
MKPointAnnotation *annotationPoint = [[MKPointAnnotation alloc] init];
coordinate.latitude = place.longitude;
coordinate.longitude = place.longitude;
region = MKCoordinateRegionMakeWithDistance(coordinate2,1000,1000);
MKCoordinateRegion adjustRegion = [myMapviewLala regionThatFits:region];
[myMapviewLala setRegion:adjustRegion animated:YES];
[annotationPoint setCoordinate:coordinate];
[myMapviewLala addAnnotation:annotationPoint];
}
if (myMapviewBNI.tag==0) {
MKCoordinateRegion region;
MKPointAnnotation *annotationPoint = [[MKPointAnnotation alloc] init];
coordinate.latitude = 51.638373;
coordinate.longitude = -0.46944;
region = MKCoordinateRegionMakeWithDistance(coordinate,15000,15000);
MKCoordinateRegion adjustRegion = [myMapviewBNI regionThatFits:region];
[myMapviewBNI setRegion:adjustRegion animated:YES];
[annotationPoint setCoordinate:coordinate];
[myMapviewBNI addAnnotation:annotationPoint];
}