var location = new AR.RelativeLocation(null, 1000, 1000);
then I call distanceToUser on it:
location.distanceToUser();
What I get is undefined, but I'm sure I get distance from RelativeLocation before.
What am I doing wrong?
E
Eva
said
about 7 years ago
Hello Jack,
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?
Thanks
J
Jack Lu
said
about 7 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.
Jack Lu