Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSNumber conversion-pair latitude and longitude
- NSNumber *a;
- for(NSDictionary *item in[res valueForKey:@"snapshot"])
- {
- a=[item valueForKey:@"lat"];
- NSLog(@"%@",a);
- b=[item valueForKey:@"lng"];
- NSLog(@"%@",b);
- }
- for(NSDictionary *item in[res valueForKey:@"snapshot"])
- {
- NSArray* latitudesList = [item valueForKey:@"lat"];
- NSArray* longitudesList = [item valueForKey:@"lng"];
- NSInteger idx = 0;
- NSInteger nb = MIN( latitudesList.count , longitudesList.count );
- for(NSInteger idx = 0; idx < nb; ++idx)
- {
- double lat = [[latitudesList objectAtIndex:idx] doubleValue];
- double lng = [[longitudesList objectAtIndex:idx] doubleValue];
- NSLog(@"Pair #%d = { %f , %f }", idx, lat, lng);
- }
- }
Add Comment
Please, Sign In to add comment