这应该是洛杉矶:
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];
但是,此注释最终在中国东部出现。转换中我缺少什么?
我想您想让洛杉矶为-118.25度。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句