这应该是洛杉矶:
double latitude = 34.05;
double longitude = 118.25;
CLLocationCoordinate2D location = CLLocationCoordinate2DMake(latitude, longitude);
NSString *desc = @"hey there";
NSString *address = @"some address";
CLLocationCoordinate2D coordinate;
coordinate.latitude = location.latitude;
coordinate.longitude = location.longitude;
MyLocation *annotation = [[MyLocation alloc] initWithName:desc address:address coordinate:coordinate]; //implements <MKAnnotation>
NSArray *annotations = @[annotation];
[self.mapView showAnnotations:annotations animated:YES];
但是这个注释最终会在中国东部。我在转换中缺少什么?
答案 0 :(得分:2)
我想你想要洛杉矶的-118.25度。