0

这应该是洛杉矶:

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];

然而,这个注释最终出现在中国东部。我在转换中缺少什么?

4

1 回答 1

2

我认为你想要洛杉矶的 -118.25 度。

于 2014-09-11T18:52:42.650 回答