9
如何通过编程快速打开带有坐标的地图App?
我有要在地图应用程序中打开的经度和纬度。我从这里尝试了此代码。 func goToMap(){ var lat1 : NSString = self.venueLat var lng1 : NSString = self.venueLng var latitude:CLLocationDegrees = lat1.doubleValue var longitude:CLLocationDegrees = lng1.doubleValue var coordinate = CLLocationCoordinate2DMake(latitude, longitude) var placemark : MKPlacemark = MKPlacemark(coordinate: coordinate, addressDictionary:nil) var mapItem:MKMapItem = MKMapItem(placemark: placemark) mapItem.name = "Target location" let launchOptions:NSDictionary = NSDictionary(object: MKLaunchOptionsDirectionsModeDriving, …
107
ios
swift
apple-maps