diff --git a/SVGeocoder/SVPlacemark.m b/SVGeocoder/SVPlacemark.m index 1f34cb9..dea4f12 100644 --- a/SVGeocoder/SVPlacemark.m +++ b/SVGeocoder/SVPlacemark.m @@ -48,8 +48,14 @@ - (id)initWithDictionary:(NSDictionary *)result { if([types containsObject:@"street_number"]) self.subThoroughfare = [component objectForKey:@"long_name"]; - if([types containsObject:@"route"]) - self.thoroughfare = [component objectForKey:@"long_name"]; + if([types containsObject:@"route"]) { + NSString *shortName = [component objectForKey:@"short_name"]; + if ([self.formattedAddress rangeOfString:shortName].location != NSNotFound) { + self.thoroughfare = shortName; + } else { + self.thoroughfare = [component objectForKey:@"long_name"]; + } + } if([types containsObject:@"administrative_area_level_3"] || [types containsObject:@"sublocality"] || [types containsObject:@"neighborhood"]) self.subLocality = [component objectForKey:@"long_name"];