Using MapKit , I can get the visible map area and then count the number of annotations inside it.However using the Google Maps I am not able to find any working example as such to refer.To begin with I know that GMSVisibleRegion
can be used for this.But can't proceed anywhere with this ..Has anyone done this?Any Suggestions?
This is how I did it using Mapkit.How can I do this using Google Maps ?
NSMutableArray *tempArray=[[NSMutableArray alloc]init];
for (KPAnnotation *annotation in self.mapView.annotations) {
if (MKMapRectContainsPoint(self.mapView.visibleMapRect, MKMapPointForCoordinate(annotation.coordinate)))
{
NSArray *myArray = [annotation.annotations allObjects];
int iCount=[myArray count];
for(int i=0;i<iCount;i++)
{
Annotation *a=[myArray objectAtIndex:i];
[tempArray addObject:a.name];
}
}
}