Start a new topic

Bug with close points that moves a lot

Bug with close points that moves a lot

Hi people

I'm currently using Wikitude for a project on Android, with PhoneGap. I read all the guides and I'm modifying the example 3_PointOfInterest_3_MultiplePois with the purpose to have some random points close to my position. The code looks like this, I only have changed the random longitude and latitude (with only 4 points) :


    // request POI data
    requestDataFromLocal: function requestDataFromLocalFn(centerPointLatitude, centerPointLongitude) {
        var poisToCreate = 4;
        var poiData = ;

        for (var i = 0; i < poisToCreate; i++) {
                "id": (i + 1),
                "longitude": (centerPointLongitude + (Math.random() *.001)),/// 5 - 0.1)),
                "latitude": (centerPointLatitude + (Math.random() *.001)),/// 5 - 0.1)),
                "description": ("This is the description of POI#" + (i + 1)),
                "altitude": "100.0",
                "name": ("POI#" + (i + 1))


Works BUT the points moves a lot, take a look:

(begin position:)


(time to dance :) )


Any ideas why? Too close?

Tks for your time.

Placement of the POIs on Screen highly depend on the device's magnetometer (digital compass) and environmental factors. Here are some things to check:

Calibrate the device's digital compass by rotating it around each axis

Move away from large metal objects as they have a bad influence on the sensor

Some devices have better accuracy than others.

Let me know if you have any questions.
Login or Signup to post a comment