Skip to content

Instantly share code, notes, and snippets.

@Arpit723
Arpit723 / FriendMapListVC.m
Created December 23, 2021 06:55
People Map Loading, Single Cluster loads
-(void)findAndMoveToCenterOfTheCity:(POIItem1*)poiItem {
NSLog(@"%s",__PRETTY_FUNCTION__);
[self addClusterToRenderingArray:poiItem];
CLGeocoder *geocoder = [[CLGeocoder alloc] init];
CLLocation *location = [[CLLocation alloc] initWithLatitude:poiItem.position.latitude longitude:poiItem.position.longitude];
[geocoder reverseGeocodeLocation:location
completionHandler:^(NSArray *placemarks, NSError *error)
{
if (error || placemarks.count == 0){
NSLog(@"Geocode failed with error: %@", error);