Start a new topic

Runtime Error on titanium injectLocation

Runtime Error on titanium injectLocation


Hi,

on titanium exemple, I modify ARchitectWindow.js  to add :

window.arview.injectLocation(45,45,-0,2);  // lat, lon, alt, accuracy

I try to fake user location but i have a runtime Error :

Uncaught Error: Class 'java.lang.Double' does not implement interface 'java.util.Map' in call to 'int java.util.Map.size()' (declaration of 'java.util.HashMap' appears in /system/framework/core-libart.jar)

Where is the problem : me, wikitude module, titanium or device ?

Exemple was clone from gitlab a few days ago.

** code added to ARchitectWindow.js in configureWindow() :

var fakeButton = Ti.UI.createButton({
        title: 'fake location',
        font: {
            fontFamily: 'Arial',
            fontSize: defaultFontSize
        },
        height: 30,
        width: 100
    });
    fakeButton.addEventListener('click', function() {
        window.arview.injectLocation(45,45,-0,2);  // lat, lon, alt, accuracy
    });

   headView.add(fakeButton);

** device : nexus 5 android 6.0.1

** titanium sdk : 5.5.1GA

** com.wikitude.ti : 5.3.0

 

Best regards,

Stéphane ADAM

 

Please have a look at the Titanium Documentation of the Wikitude Extenstion.
Should look like this

wikitude.injectLocation({ "latitude": 47.22234, "longitude": -18.77464, "altitude": 250, "accuracy": 10 });

Best regards,
Andreas
Login or Signup to post a comment