Start a new topic

[iOS] How to use injectLocation ?

[iOS] How to use injectLocation ?


I've seen these 2 methods in the reference


? injectLocationWithLatitude:longitude:altitude:accuracy:

? injectLocationWithLatitude:longitude:accuracy:


But I'am not quite sure how to use it. When do I should call it? 

I tried to put this code when the architect view is started. But nothing happens anyway.

;

What do I need make use of this location I've been injected? (E.g. create a model/POI from this location.)

======================

And one more question here: 


? callJavaScript:


Am I able to use this function to add some more code in 'World', like add more model, or bind a model with given location.

 

P.S. I did search before asking. The only post I've found related is the one below, which is still unanswered. So I post mine with a little more question

http://developer.wikitude.com/developer-forum/-/message_boards/message/139287

 

Thanks.

Hi,

 


? injectLocationWithLatitude:longitude:altitude:accuracy:

? injectLocationWithLatitude:longitude:accuracy:


You can use this methods to inject a 'fake' GPS position. This can become necessary when your ARchitect World should use a fixed reference point to start from e.g. a game at a specific monument or place. But in general you don't have to use this method if you don't have to.

After you've injected a new location the 'onLocationChanged' callback will be triggered and all your currently existing drawables will be redrawn, reflecting the new location.

 

Best regards

Andreas
Login or Signup to post a comment