| Forum | GitHub | Maps | Blog

Cant get method getInstructions in graphopper-ios using swift


hi this is mi code for initialize graphhoper

func initGraphhoper(){
    let location: String? = Bundle.main.path(forResource: "graph-data", ofType: "osm-gh")
    self.hopper = GraphHopper()
    self.hopper.setEncodingManagerWith(EncodingManager.init(nsString: "car,foot,bike"))
    self.hopper.load__(with: location)

and i am trying to get the instructions for the path in this way

let path : PathWrapper = result.getBest()
let instructions = path.getInstructions()

but xcode give me this error
Value of type ‘PathWrapper’ has no member getInstructions

Any help


Any one can help me?


add this in your bridging header :

#import “com/graphhopper/util/InstructionList.h”