Start a new topic

POI AR - Location related Questions

POI AR - Location related Questions

1 person has this problem


Please find answers inline:

In the comment of the locationChanged method I found in the examples it says "location updates, fired every time you call architectView.setLocation() in native environment". There is no method like this in the native environment but location updates get fired anyway. Where do they come from?

iOS SDK uses system's LocationManager by default to ensure you have best possible user location. In case you need to implment a custom (e.g. indoor) location manager, the injectLocation method is offered, so you can overrule the default behaviour.
The AR.context.onLocationChanged callback gets fired whenever a location is set in native iOS/Android environment.
 

I found the method "injectLocationWithLatitude..." which does something like the "setLocation()" method. But in the description it says it should only be used for simulation. Why is that?

You may want to simulate that the user is at a certain position - Using default location is fine for iOS, but besides simulation, also custom (e.g. indoor) scenarios are valid reasons to call the injectLocation function.
Sorry for confusion.
 

Finally, the conclusive question: For my API call, should I use to locations from the AR World's locationChanged Callback or should I use the ones I receive with the LocationManager in the native environment - and then inject them to the ar world?

In general both approaches are working but I recommend to implement as much as possible in JS. That saves implementation effort in case you later on want to also support Android.

 

 

Hi Guys

I am using Wikitude AR to display geo location based elements.

The native environment calls a rest api using the current location, then gets different POIs back which are set to the AR World using the call javascript method.

Now to the questions:

- in the comment of the locationChanged method I found in the examples it says "location updates, fired every time you call architectView.setLocation() in native environment". There is no method like this in the native environment but location updates get fired anyway. Where do they come from?

- I found the method "injectLocationWithLatitude..." which does something like the "setLocation()" method. But in the description it says it should only be used for simulation. Why is that?

- Finally, the conclusive question: For my API call, should I use to locations from the AR World's locationChanged Callback or should I use the ones I receive with the LocationManager in the native environment - and then inject them to the ar world?

Thanks very much

Nino
Login or Signup to post a comment