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 に答える