Skip to content

Directions on pin not showing up on Swift 3 #2

@dtnguy72

Description

@dtnguy72

Hello,

I just converted the code to Swift 3 and unable to see the directions when clicking on the selected pin nor does the image of the car show up.

screen shot 2016-10-12 at 9 47 41 pm

func getDirections(){
if let selectedPin = selectedPin {
let mapItem = MKMapItem(placemark: selectedPin)
let launchOptions = [MKLaunchOptionsDirectionsModeKey : MKLaunchOptionsDirectionsModeDriving]
mapItem.openInMapsWithLaunchOptions(launchOptions)
}
}
The func getDirections is in the Viewcontroller.swift but it doesn't show up on the simulator. Is there a way to get it to work?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions