Start a new topic

Problem with architectView.setLocation

Problem with architectView.setLocation

hi Aitor,


I am still reviewing what different implementations causes different results.


The implementation in Wikitude SDK after I modify to just fire once, I can see the Geo object.

The almost same implementation in another workspace just cannot see the Geo object.


Do you think the library source I use matter? I cannot verify with Wikitude SDK workspace, it got a build error after I change to implementation 'com.wikitude:js:9.6.0'

implementation project(path: ':wikitude-sdk')
implementation 'com.wikitude:js:9.6.0' 

I have replaced the public void onLocationChanged(Location location) and poiatlocation.js to become identical, still, I cannot get the Geo object shown on phone. An indicator marker is drawn and keep moving/pointing where is the Geo Object but did not show on the screen.


markerObject.drawables.addIndicatorDrawable(indicatorDrawable);


I really cannot find what other causes different result.

Singapore time at 3.33 pm, after clean and rebuild, an ADE menu appears, this is my first time seeing it.


image


I think I found the problem, this "altitude": 100.0 give the problem


sample code

if (!World.initiallyLoadedData) {

            /* Creates a poi object with a random location near the user's location. */

            var poiData = {

                "id": 1,

                "longitude": (lon + (Math.random() / 5 - 0.1)),

                "latitude": (lat + (Math.random() / 5 - 0.1)),

                "altitude": 100.0

            };


My modification, problem, "altitude": alt also got a problem

if (!World.initiallyLoadedData) {
/* Creates a poi object with a random location near the user's location. */
var poiData = {
"id": 1,
/*"longitude": (lon + (Math.random() / 5 - 0.1)),
"latitude": (lat + (Math.random() / 5 - 0.1)),*/
"longitude": lon,
"latitude": lat,
"altitude": (0.0 + alt)
};

what should be the correct way of passing parameters and the Geo object to user relationship, especially the altitude?


architectView.setLocation(location.getLatitude(), location.getLongitude(), location.getAltitude(), accuracy);


I send in by 5.0 + location.getAltitude() also not working correctly.

the 
document and example are not very clear too.

by the way, I also like to know how to set the altitude for the Geo Object (yellow cyclinder) for the example below, let us said.

LAT1 = 1.3250652, LOG1=103.8908282 Altitude = 20.8099365234375 (phone info)

LAT2 = 1.3250684, LOG1=103.89083 Altitude = 25.809937


image


Hi,


As the documentation says, the altitude should be the current altitude of the device in meters. In case you don't know the exact value, I would suggest you to put the altitude to AR.CONST.UNKNOWN_ALTITUDE, which will put the poiData on the user-level -> our Selecting Pois sample should show the behaviour of this value. Nevertheless, I see that our implementation may cause some confusion and I'll review it to see how can we improve it.


Regards,


Aitor.

version 9.6.0, "altitude": AR.CONST.UNKNOWN_ALTITUDE will have the same result where the geo object is missing and the indicator is pointing, like "altitude": (0.0 + alt) behaviour.

Hi,


Did you try our sample app to check if that implementation is working on your device? It could give you a clue of what's going on. Another question I would have is, do you know if the POI is properly loaded? With this I'm asking if the AR.GeoObject drawable is successfully created with your implementation.


Regards,


Aitor.

Hello Juan Luis , 

I have a problem where my application doesn't detect the user's location, could you please show me how did you implement it?

Hi Aitor


Kindly try the following implementations (1,2,3) on Wikitude 9.6.0 examples 08_PointOfInterest_4_SelectingPois to see the AR engine problem.


1. "altitude": (2.0 + alti),

2. //"altitude": alti,

3. //"altitude": AR.CONST.UNKNOWN_ALTITUDE,

js
js
(13.8 KB)
java

Hi,


I did try by downloading our sample app from scratch and the POIs were always shown in my case. What I could see as an issue is that I set the altitude to 100 and the position was the same than AR.CONST.UNKNOWN_ALTITUDE. Nevertheless, I couldn't reproduce your issue where the POIs are not shown at all. Do you have a chance to test this with a second device?


Regards,


Aitor.

Hi Aitor


What is your distance between the Geo Object and the test device?

Have you tried to replace the original sample with my 3 sample files?

Have you tried these values?

1. "altitude": (2.0 + alti),

2. //"altitude": alti,

3. //"altitude": AR.CONST.UNKNOWN_ALTITUDE,


08_PointOfInterest_1_PoiAtLocation sample is 100. when you change to ALT send from SimpleGeoArActivity.java see what happen.

Hello Jai Gay,


I see that this thread covers a lot of instructions and details provided by Aitor and I’d like to add details to our support process in general to manage your expectations. 


For questions such as the one we’re dealing in this thread, our approach is to give instructions and ideas on how to solve the problem, links to the Wikitude documentation and samples. We’re not providing 3rd party development and therefore can’t implement any code or samples. As the support is done by our core team to ensure a high quality support process, I hope you can understand that we need to work efficiently.


Ideally you make sure that you fully understand the sample app and work together with the documentation. 


Again we want to thank you for your understanding.

Wikitude Support Team

Login or Signup to post a comment