We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello good day,
First congratulations for the project. Excuse my English.
Three questions:
1.- How can I configure the design of the cluster view? 2.- Is it necessary to register ClusterAnnotationView?
mapView.register(ClusterAnnotationView.self, forAnnotationViewWithReuseIdentifier: ClusterAnnotationView.identifier)
3.- What happens when the annotation is of type MKClusterAnnotation?
Here my code:
func mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool) { clusteringManager.renderAnnotations(onMapView: mapView) } func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? { switch annotation { case let annotation as ClusterAnnotation: let id = ClusterAnnotationView.identifier var clusterView = mapView.dequeueReusableAnnotationView(withIdentifier: id) if clusterView == nil { clusterView = ClusterAnnotationView(annotation: annotation, reuseIdentifier: id) } else { clusterView?.annotation = annotation } return clusterView case let annotation as MKClusterAnnotation: let id = ClusterAnnotationView.identifier var clusterView = mapView.dequeueReusableAnnotationView(withIdentifier: id) if clusterView == nil { clusterView = ClusterAnnotationView(annotation: annotation, reuseIdentifier: id) } else { clusterView?.annotation = annotation } return clusterView case let annotation as ParkingMeterAnnotation: let id = ParkingMeterAnnotationView.reuseId var parkingMeterAnnotationView = mapView.dequeueReusableAnnotationView(withIdentifier: id) if parkingMeterAnnotationView == nil { parkingMeterAnnotationView = ParkingMeterAnnotationView(annotation: annotation, reuseIdentifier: id) } else { parkingMeterAnnotationView?.annotation = annotation } return parkingMeterAnnotationView default: // return annotation view SLog(message: "") return MKAnnotationView() }
Finally the error I receive is an exception, attached capture.
Thanks for your attention,
A greeting.
The text was updated successfully, but these errors were encountered:
Hello again,
Actually the error is here:
As you indicate in:
https://robots.thoughtbot.com/how-to-handle-large-amounts-of-data-on-maps#adding-only-the-annotations-we-need
Many thanks,
Sorry, something went wrong.
No branches or pull requests
Hello good day,
First congratulations for the project. Excuse my English.
Three questions:
1.- How can I configure the design of the cluster view?
2.- Is it necessary to register ClusterAnnotationView?
3.- What happens when the annotation is of type MKClusterAnnotation?
Here my code:
Finally the error I receive is an exception, attached capture.
Thanks for your attention,
A greeting.
The text was updated successfully, but these errors were encountered: