hulab / ClusterKit

An iOS map clustering framework targeting MapKit, Google Maps and Mapbox.
MIT License
512 stars 86 forks source link

diSelect Annotation #33

Open syedrazackimran opened 6 years ago

syedrazackimran commented 6 years ago

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)

`

maxep commented 6 years ago

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.

syedrazackimran commented 6 years ago

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
tarangpatel commented 6 years ago

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

FedeGens commented 5 years ago

in my situation, didSelectAnnotation is not getting called too.

Did you find any solution?

FedeGens commented 5 years ago

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