Start a new topic

Problem with GeoLocation

Problem with GeoLocation


Hi Carlos,

The error you see can be neglected when you use ADE. ADE won't understand the architect:// protocol, because it runs in the browser, but that does not cause any problems.

Are you actually close to that position you've mentioned (AR.GeoLocation(42.796841, -1.637549);)? Only then will you be able to see the images.

If it works with relative locations, the same code will also work with GeoLocations.

Best,

Martin

Hi, I am a spanish student, and I am doing the finally proyect, and I am using Wikitude SDK for make an AR World with geolocation.

I dont know to much english.

I have the next problem, if I put this code,using RelativeLocation, it runs and show the geoObject and the indicator.

But if I want to use geoLocation, it doesnt run. Why?

The javascript console, always show the same code error in both cases:

GET architect://architect.js net::ERR_UNKNOWN_URL_SCHEME

 

There is the code that runs:


var Estadio = {

    planetsInfo: null,

 

    init: function() {

        

        var locationSadar = new AR.RelativeLocation(null, 25000, 0, 5000);

 

        var arrowImg = new AR.ImageResource("assets/arrow.png");

        var arrowDrawable= new AR.ImageDrawable(arrowImg, 15);

        

        geoObject = new AR.GeoObject(locationSadar);

        geoObject.drawables.cam=arrowDrawable;

        geoObject.enabled=true;

       

        var indicatorImg = new AR.ImageResource("assets/indi.png");

               

        // Add indicator to geoObject

        var indicatorDrawable = new AR.ImageDrawable(indicatorImg, 0.1, { verticalAnchor: AR.CONST.VERTICAL_ANCHOR.TOP });

        geoObject.drawables.addIndicatorDrawable(indicatorDrawable);

    }

};

 

Estadio.init();

 

 

And there is the code that doesn´t runs:


var Estadio = {

    planetsInfo: null,

 

    init: function() {

        

        var geoLocation = new AR.GeoLocation(42.796841, -1.637549);

        var locationSadar = new AR.RelativeLocation(geoLocation, 10, 10, 10);

 

        var arrowImg = new AR.ImageResource("assets/arrow.png");

        var arrowDrawable= new AR.ImageDrawable(arrowImg, 15);

        

        geoObject = new AR.GeoObject(locationSadar);

        geoObject.drawables.cam=arrowDrawable;

        geoObject.enabled=true;

       

        var indicatorImg = new AR.ImageResource("assets/indi.png");

               

        // Add indicator to geoObject

        var indicatorDrawable = new AR.ImageDrawable(indicatorImg, 0.1, { verticalAnchor: AR.CONST.VERTICAL_ANCHOR.TOP });

        geoObject.drawables.addIndicatorDrawable(indicatorDrawable);

    }

};

 

Estadio.init();

 

I think it will be posible that the code doesn´t load the images?

 

Thanks

Login or Signup to post a comment