ClusterKit icon indicating copy to clipboard operation
ClusterKit copied to clipboard

diSelect Annotation

Open syedrazackimran opened this issue 7 years ago • 5 comments

Hi,

I am trying to integrate your cluster into my project it's quite awesome. I have some clarification. now I am working on a rental project so I need to take maker and I need to show callout view. unfortunately, when I tap marker nothing is happing pls kindly do needful and also when the map is load I need to zoom it on country base I changed specific location but I don't know zooming kindly check it

herewith i attached delegate method screen check it once screen shot 2017-11-23 at 4 27 03 pm

simulator screen shot nov 23 2017 at 4 30 56 pm

` let algorithm = CKNonHierarchicalDistanceBasedAlgorithm() algorithm.cellSize = 200

    mapView.clusterManager.algorithm = algorithm
    mapView.clusterManager.marginFactor = 1
    mapView.clusterManager.maxZoomLevel = 50
    
    let paris = CLLocationCoordinate2D(latitude: 11.5449, longitude: 104.8922)
    mapView.setCenter(paris, animated: false)

`

syedrazackimran avatar Nov 23 '17 09:11 syedrazackimran

Hi, I'm not sure to understand your issue. To show the callout view you need to set the property MKAnnotationView's property canShowCallout to true in your func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView) implementation. For zooming to the annotation, you can change the mapview camera. Hope that's help.

maxep avatar Nov 23 '17 11:11 maxep

Hi

Thanks for your reply. I need to show some view when the user taps the marker. as per your last suggestion canshowCallout i set as true but I don't know why it's not working I add some screen kindly check it once.

screen shot 2017-11-24 at 8 57 49 am

syedrazackimran avatar Nov 24 '17 02:11 syedrazackimran

I am also not able to select any annotations. didSelectAnnotation is not getting called ? @syedrazackimran any solution you found ?

tarangpatel avatar Apr 08 '18 20:04 tarangpatel

in my situation, didSelectAnnotation is not getting called too.

Did you find any solution?

FedeGens avatar Nov 21 '18 13:11 FedeGens

in my situation, didSelectAnnotation is not getting called too.

Did you find any solution?

I have actually found the solution. I wasn't setting correctly the point width and height.

@tarangpatel try with: annotationView.frame.size.height = 50 annotationView.frame.size.width = 50

FedeGens avatar Nov 21 '18 14:11 FedeGens