我正在使用以下代码来显示给定Lon值的图像,但它给出了错误
NSString*lat=latitude;
NSString*longi=longitude;
mapView = [[MKMapView alloc] initWithFrame:self.view.bounds];
mapView.mapType = MKMapTypeHybrid;mapView.mapType=MKMapTypeHybrid;
double _lat = [lat doubleValue];
double _lng = [longi doubleValue];
CLLocationCoordinate2D coord = (CLLocationCoordinate2D){_lat, _lng};
MKCoordinateSpan span = (MKCoordinateSpan){0.2, 0.2};
MKCoordinateRegion region = (MKCoordinateRegion){coord, span};
[mapView setRegion:region];
[self.view addSubview:mapView];发布于 2011-08-29 16:13:33
几个问题:
https://stackoverflow.com/questions/7226782
复制相似问题