this is my code:
CLLocationCoordinate2D location1;
for(int i=0;i<[appDelegate.books count];i++)
{
Book *aBook= [appDelegate.books objectAtIndex:i];
NSLog(@"Reading id value :%f",aBook.Latitude);
location1.latitude=aBook.Latitude;
location1.longitude=aBook.Longitude;
addAnnotation = [[AddressAnnotation alloc] initWithCoordinate:location];
[mapView addAnnotation:addAnnotation];
here aBook is the object that have the
latitude and longitude value.
i want to assign the value of
aBook.latitude to aBook.longitude to
ClLocationcoordinate object location1
but i am not getting the output,
in consol window i am getting the 0 value
when i am trying to print.
how can i access the value of aBook.latitude.