我将地图点的纬度和经度值保存为我的数据库中的整数。
所以我的值是这样的:3454534353。但是使用时,我需要使用浮点数作为34.54534353。
我怎样才能进行这种转换?
这是我创建地图点的方法:
MapLocation *location = [[MapLocation alloc] init];
location.title = [NSString stringWithString:[locations objectForKey:@"title"]];
location.subtitle = [NSString stringWithString:[locations objectForKey:@"subtitle"]];
CLLocationCoordinate2D coordinate;
coordinate.latitude = // need a float like xx.xxxxx
coordinate.longitude = // need a float like xx.xxxxx;
location.coordinate = coordinate;
[annotations addObject:location];
[mapView addAnnotations:annotations];
提前致谢。