我有一个问题。我正在使用自定义视图作为我的地图视图的标注附件。我在将标注移动到该视图的右下角方面遇到了一些问题。我目前正在尝试获取所选注释的CGPoint坐标,但除此之外我一无所获。任何帮助都将不胜感激。
我当前正在使用的代码(我知道它是不正确的)是:
CGPoint bottomLeftPoint = CGPointMake(xOffset,[self.internalAnnotationCallout view].frame.size.height);
CLLocationCoordinate2D bottomLeftCoord = [self.branchLocation convertPoint:bottomLeftPoint toCoordinateFromView:self.branchLocation];
MKCoordinateSpan span = {latitudeDelta: kMapMultiLatDelta, longitudeDelta: kMapMultiLatDelta};
MKCoordinateRegion region = {bottomLeftCoord, span};
[self.branchLocation setRegion:region animated:YES];
//[self.branchLocation setCenterCoordinate:newCenterCoordinate animated:YES];