Maps 4

How to enable black mode in Google Maps in iOS

Issue #246

Use GMSMapStyle https://developers.google.com/maps/documentation/android-sdk/styling Export styling json from https://mapstyle.withgoogle.com/

let mapStyleUrl = Bundle.main.url(forResource: "mapStyle", withExtension: "json" …

How to zoom in double in MapKit

Issue #183

func zoomInDouble(coordinate: CLLocationCoordinate2D) {
    let region = mapView.region
    let zoomInRegion = MKCoordinateRegion(
        center: coordinate,
        span: MKCoordinateSpan(
            latitudeDelta: region.span. …

How to select cluster annotation in MapKit

Issue #182

func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView) {
    guard let coordinate = view.annotation?.coordinate else {
        return
    }
    
    if (view.annotation is MKClusterAnnotation) {
        zoomInDouble( …

How to cluster annotations in MapKit in iOS 11

Issue #181

https://developer.apple.com/documentation/mapkit/mkannotationview/decluttering_a_map_with_mapkit_annotation_clustering

final class AnnotationView: MKMarkerAnnotationView {
    override init(annotation: MKAnnotation?, reuseIdentifier: …