我想在iOS中打开带有语音导航的谷歌地图应用程序

我想在iOS中打开带有语音导航的谷歌地图应用程序,ios,google-maps,maps,Ios,Google Maps,Maps,我想用语音导航打开默认的谷歌地图应用。 我使用以下代码打开了带有源位置和目标位置的谷歌地图应用程序。谷歌地图应用程序打开得很好,每个转弯的方向也正常,但语音导航不起作用。 请帮我做这个 NSString* url = [NSString stringWithFormat: @"googlemaps://maps.google.com/maps?output=embed&saddr=%f,%f&daddr=%f,%f",[@"30.886537" doubleValue], [@"

我想用语音导航打开默认的谷歌地图应用。 我使用以下代码打开了带有源位置和目标位置的谷歌地图应用程序。谷歌地图应用程序打开得很好,每个转弯的方向也正常,但语音导航不起作用。 请帮我做这个

NSString* url = [NSString stringWithFormat: @"googlemaps://maps.google.com/maps?output=embed&saddr=%f,%f&daddr=%f,%f",[@"30.886537" doubleValue], [@"75.838870" doubleValue],[@"30.711423" doubleValue],[@"76.690839" doubleValue]];
    [[UIApplication sharedApplication] openURL: [NSURL URLWithString:url]];

请尝试以下功能:

location = "(self.street!) (self.zip!) (self.city!) (self.country!)"
func showLocationPoints(location:String)
{

    let geocoder:CLGeocoder = CLGeocoder()
    geocoder.geocodeAddressString(location, completionHandler: {(placemarks, error) -> Void in

        if((error) != nil){
            print("Error", error)
        }
        else if let placemark = placemarks!.first
        {
            let coordinates:CLLocationCoordinate2D = placemark.location!.coordinate
            let pointAnnotation:MKPointAnnotation = MKPointAnnotation()
            pointAnnotation.coordinate = coordinates
            pointAnnotation.title = "Apple HQ"

            let span:MKCoordinateSpan = MKCoordinateSpanMake(0.01 , 0.01)
            let region:MKCoordinateRegion = MKCoordinateRegionMake(coordinates, span)
            self.mapView?.setRegion(region, animated: true)

            self.mapView?.addAnnotation(pointAnnotation)
            self.mapView?.centerCoordinate = coordinates
            self.mapView?.selectAnnotation(pointAnnotation, animated: true)
            print("Added annotation to map view")

            let place = MKPlacemark(coordinate: coordinates, addressDictionary: nil)
            let mapItem = MKMapItem (placemark: place)

            mapItem.name = location

            let options = [MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeDriving, MKLaunchOptionsShowsTrafficKey: true]
            MKMapItem.openMapsWithItems([mapItem], launchOptions: options as? [String : AnyObject])

        }
    })
}

他问的是谷歌地图,不是苹果地图。