//距离计算
- (NSString *)distanceLatitude:(NSString*)latitude longitude:(NSString*)longitude
{
//距离计算
CLLocation *orig =[[CLLocation alloc] initWithLatitude:[self.userLocation doubleValue] longitude:[self.userlongitude doubleValue]];
CLLocation* dist =[[CLLocation alloc] initWithLatitude:[latitude doubleValue] longitude:[longitude doubleValue] ];
CLLocationDistance kilometers=[orig distanceFromLocation:dist];
float distanceF = kilometers;
NSString *distanceSTr = [NSString stringWithFormat:@"%0.fM",distanceF];
if(distanceF > 1000)
{
distanceF = kilometers/1000;
distanceSTr = [NSString stringWithFormat:@"%0.fkm",distanceF];
}
return distanceSTr;
}