Start a new topic

3D markers with geolocation problem.

I have a problem with geolocation and 3D Markers. Actually, with geolocation in general.


I tested your product with your samples, in concrete with 3D Model at Geolocation.

I draw 12 points from one corner of the street to the oposite corner.


The code is more or less exactly as the sample's code, but with more points, and the results is weird. I don't know what is happening, but the representation is not accurate (i don't think it's a GPS problem), but I expected that the first point.


I hoped that the first point was located visually at the end of the street and the first at the beginning, but the result is not the expected.


Anyone can tell me what I'm doing wrong? Thank you


var World = {
loaded: false,
rotating: false,
init: function initFn() {
this.createModelAtLocation();
},

createModelAtLocation: function createModelAtLocationFn() {

/*
First a location where the model should be displayed will be defined. This location will be relativ to the user.
*/

var geoLoc_1 = new AR.GeoLocation(39.4805825615605,-0.445396131397292);
var geoLoc_2 = new AR.GeoLocation(39.4802810123766,-0.44423611787023);

var geoLoc_3 = new AR.GeoLocation(39.4805680,-0.4453404);
var geoLoc_4 = new AR.GeoLocation(39.4805520,-0.4452752);
var geoLoc_5 = new AR.GeoLocation(39.4805333,-0.4452049);
var geoLoc_6 = new AR.GeoLocation(39.4805136,-0.4451296);
var geoLoc_7 = new AR.GeoLocation(39.4804834,-0.445014);
var geoLoc_8 = new AR.GeoLocation(39.4804576,-0.4449170);
var geoLoc_9 = new AR.GeoLocation(39.4804216,-0.4447798);
var geoLoc_10 = new AR.GeoLocation(39.4803829,-0.4446372);
var geoLoc_11 = new AR.GeoLocation(39.4803584,-0.4445292);
var geoLoc_12 = new AR.GeoLocation(39.4803143,-0.4443621);

var rel_1 = new AR.RelativeLocation(geoLoc_1, 0, 0, -6);
var rel_2 = new AR.RelativeLocation(geoLoc_2, 0, 0, -6);
var rel_3 = new AR.RelativeLocation(geoLoc_3, 0, 0, -6);
var rel_4 = new AR.RelativeLocation(geoLoc_4, 0, 0, -6);
var rel_5 = new AR.RelativeLocation(geoLoc_5, 0, 0, -6);
var rel_6 = new AR.RelativeLocation(geoLoc_6, 0, 0, -6);
var rel_7 = new AR.RelativeLocation(geoLoc_7, 0, 0, -6);
var rel_8 = new AR.RelativeLocation(geoLoc_8, 0, 0, -6);
var rel_9 = new AR.RelativeLocation(geoLoc_9, 0, 0, -6);
var rel_10 = new AR.RelativeLocation(geoLoc_10, 0, 0, -6);
var rel_11 = new AR.RelativeLocation(geoLoc_11, 0, 0, -6);
var rel_12 = new AR.RelativeLocation(geoLoc_12, 0, 0, -6);






// var circle = new AR.Circle(1);

/*
Next the model object is loaded.
*/
var modelEarth = new AR.Model("assets/earth.wt3", {
onLoaded: this.worldLoaded,
scale: {
x: 1,
y: 1,
z: 1
}
});


var obj_1 = new AR.GeoObject(rel_1, { drawables: { cam: [modelEarth] } });
var obj_2 = new AR.GeoObject(rel_2, { drawables: { cam: [modelEarth] } });
var obj_3 = new AR.GeoObject(rel_3, { drawables: { cam: [modelEarth] } });
var obj_4 = new AR.GeoObject(rel_4, { drawables: { cam: [modelEarth] } });
var obj_5 = new AR.GeoObject(rel_5, { drawables: { cam: [modelEarth] } });
var obj_6 = new AR.GeoObject(rel_6, { drawables: { cam: [modelEarth] } });
var obj_7 = new AR.GeoObject(rel_7, { drawables: { cam: [modelEarth] } });
var obj_8 = new AR.GeoObject(rel_8, { drawables: { cam: [modelEarth] } });
var obj_9 = new AR.GeoObject(rel_9, { drawables: { cam: [modelEarth] } });
var obj_10 = new AR.GeoObject(rel_10, { drawables: { cam: [modelEarth] } });
var obj_11 = new AR.GeoObject(rel_11, { drawables: { cam: [modelEarth] } });
var obj_12 = new AR.GeoObject(rel_12, { drawables: { cam: [modelEarth] } });


/* var distanceInMeter = geoLoc_1.distanceTo(geoLoc_2);
alert (distanceInMeter);
var distanceToUser = geoLoc_12.distanceToUser();
alert (distanceToUser);*/


},

worldLoaded: function worldLoadedFn() {
World.loaded = true;
var e = document.getElementById('loadingMessage');
e.parentElement.removeChild(e);
}
};
AR.context.onLocationChanged = World.locationChanged;
World.init();

Hello Carlos,

Yes, the experience will be improved if you are testing with a device that has a gyroscope.

Thanks
Eva

 

Hi. Unfortunately, it does not have a gyroscope. Would the experience with the application be better with a device with gyroscope? 


Thank you Eva!

Hello Carlos,

I have to say that I find your approach to substitute line drawing very interested. Can you please check if the device you are testing with has a gyroscope?

Thanks
Eva

 

Here is the video. I know wikitude don't support drawling lines, that's why i'm using this method, to simulate it. It will be a great improvement that wikitude supports line drawing.


 

<iframe width="854" height="480" src="https://www.youtube.com/embed/mgqbDSLXoFc" frameborder="0" gesture="media" allowfullscreen></iframe>

 


1 person likes this
Hello Carlos,

Thanks for providing your code but could you please also share a video demonstrating your issue? Since you are working with GeoLocation we would need to change the locations you provided in order to test it whereas, with the video it will be faster to investigate. Please, also note that we do not support drawing lines.

Thanks
Eva

 

Login or Signup to post a comment