-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
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
How to handle GMSCircle #32
Comments
Hi @MarvinNazari |
@maxep: I already have a pin with custom view which I use |
Not sure to understand what you mean by it's own overlay. |
This is my use case, and i have already a pretty complicated custom view which i use for class ViewController: UIViewController {
lazy var mapView: GMSMapView = {
let view = GMSMapView()
return view
}()
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
mapView.frame = view.bounds
}
override func viewDidLoad() {
super.viewDidLoad()
[
MapPinViewModel(coordinate: CLLocationCoordinate2D(latitude: 40.7589, longitude: -73.9851), accuracyRadius: 500)
].forEach { pin in
pin.show(in: mapView)
}
}
}
struct MapPinViewModel {
let coordinate: CLLocationCoordinate2D
let accuracyRadius: Double
func show(in mapView: GMSMapView) {
mapMarker.map = mapView
accuracyCircle.map = mapView
}
var mapMarker: GMSMarker {
return GMSMarker(position: coordinate)
}
var accuracyCircle: GMSCircle {
return GMSCircle(position: coordinate, radius: accuracyRadius)
}
} |
HI, awesome framework, really easy to handle clustering, I'm interested to know if u have some suggestion how u would handle adding circles for the pin, in my case is basically accuracy circle which I use GMSCircle to show that. But with cluster
GMSMapViewDataSource
there is no way to add the circle, I wonder if u know any workaround for any delegates call that I can use to add the circles my self, I only want to add the circles when the pins are unclustred.Thanks.
The text was updated successfully, but these errors were encountered: