Saturday 1 December 2012

Get coordinats from array of latitude and longitude ?

Arr_title = [[[[main valueForKey:@"responseData"] valueForKey:@"results"]valueForKey:@"titleNoFormatting"] copy];
    Arr_address=[[[[main valueForKey:@"responseData"]valueForKey:@"results"]valueForKey:@"addressLines"] copy];
    Arr_Lat=[[[[main valueForKey:@"responseData"]valueForKey:@"results"]valueForKey:@"lat"] copy];
    Arr_Long=[[[[main valueForKey:@"responseData"]valueForKey:@"results"]valueForKey:@"lng"] copy];
    Arr_call=[[[[[main valueForKey:@"responseData"]valueForKey:@"results"]valueForKey:@"phoneNumbers"]valueForKey:@"number"] copy];

   
    NSLog(@"Latitude------------ : %@",Arr_Lat);
    NSLog(@"Longitude-------------: %@",Arr_Long);
   
   
   
   
   
    NSString *latst=[[NSString alloc]initWithFormat:[Arr_Lat objectAtIndex:0]];
    NSString *longst=[[NSString alloc]initWithFormat:[Arr_Long objectAtIndex:0]];
   
    NSLog(@"First  lat : %@",latst);
    NSLog(@"First  long : %@",longst);
   
   
   
    CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(coord.latitude = [latst doubleValue], coord.longitude = [longst doubleValue]);

No comments:

Post a Comment