var location = new AR.RelativeLocation(null, 1000, 1000);
then I call distanceToUser on it:
What I get is undefined, but I'm sure I get distance from RelativeLocation before.
What am I doing wrong?
over 4 years ago
We tested the code you pasted here in our samples and it is working fine. Could you please check your code again or download our sample and check it there?
about 4 years ago
Maybe I got the case. I suspect it's because there's no GPS connection at that time.
Previously I thought wikitude determines distanceToUser for a RelativeLocation with a null reference without GPS data, since it represents a location relative to user himself. Now it seems that it's still using GPS data to calculate distanceToUser for such a RelativeLocation.