Start a new topic

Absolute geolocation point

Absolute geolocation point


I try to use ablosute geolocation to show 3d model on that place. Problem is there is no odel and no pointer to that model. With reletive location it works fine. When I try to find distance to that point from my current location dist variable return -1, no matter location compared with location2 or reverse.

var location = new AR.RelativeLocation(null, 0, -10, 0);

var location2 = new AR.GeoLocation(60.2211255, 24.805152);

var dist = location.distanceTo(location2);

Any ideas what's going wrong?

Regards Wenhao

Locations that are relative to the user only work after user's location is known.
Just in case it helps: There is a "distanceToUser" function which you may use for location2.distanceToUser()

Best regards,


Thanks, but I have a further questioin.

When I try to find my location with this code:

navigator.geolocation.getCurrentPosition(success, error, options);

I get an error: "User denied Geolocation".

Location detection is turned on on the phone and it works correct in android app (I use Wikitude in android app), but not in javascript.

This is some kind of restriction in chrome using geolocation from "file://" and solution is to run web page on localhost :(

Still same question how to show 3d model on absolute geolocation point?
Login or Signup to post a comment