Closed tnmendes closed 7 years ago
i get the instructions in ios, using swift 3 like this
let path : PathWrapper = result.getBest()
let instructions : InstructionList = path.getInstructions()
let count = instructions.size()
for i in stride(from: 0, to: count, by: 1) {
let instruction : Instruction = instructions.getWith(i)
let cantPointInstruction = instruction.getPoints().size()
var j : jint = 0
while j < cantPointInstruction {
let xLongitud = instruction.getPoints().getLongitudeWith(j)
let yLatitud = instruction.getPoints().getLatitudeWith(j)
let position = projection.fromWgs84(NTMapPos(x: xLongitud, y: yLatitud))
// in do something with the instruction position and the instruction
j += 1
}
}
@tnmendes Questions go better into our forum (closing for now). Thanks @RandyHBH for providing help here (I guess this is swift?).
@karussell yes it is swift.
@RandyHBH Thank you, I'll see if in the next few days I'll try that.
In android we can request getHints() and the instruction, in iOS i saw that the code is graphhopper but is not allowed to used.
Do someone know how to request the array with the instruction in iOS?
thanks in advance