Hello I am working on Mapkit in an iPhone Application . I am actaually showing multiple numbers of locations. The problem is that i am getting the same Lat. and Long.. for all of the locations. The area of the location is Singapore . I am showing number of universities in the location area.
My code is below
-(CLLocationCoordinate2D) addressLocation:(int)num{
NSString *urlString = [NSString stringWithFormat:@"http://maps.google.com/maps/geo?q=%@&output=csv",[[address objectAtIndex:num] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSString *locationString = [NSString stringWithContentsOfURL:[NSURL URLWithString:urlString]];
NSArray *listItems = [locationString componentsSeparatedByString:@","];
double latitude ;
double longitude ;
if([listItems count] >= 4){
latitude = [[listItems objectAtIndex:2] doubleValue];
longitude = [[listItems objectAtIndex:3] doubleValue];
}
else {
//Show error
}
In the List Items i could see only the same values for latitude and longitude
200,
1,
"1.3520830",
"103.8198360".
If you have any solution for the same than please let me know