Start a new topic

Label is not visible in Image target

 Hi Team,


I have added the code for label to show it on Image target. But unfortunately its not visible. Could you please help to resolve this. I have added my code and my project link.



 Link: Project Url

var label = new AR.Label("Hello", 10, {
            translate: { x: -0.3 },
            onClick: function () {
                label.text += "CLICK "
            },
            zOrder: 1,
            verticalAnchor: AR.CONST.VERTICAL_ANCHOR.TOP,
            opacity: 0.1,
                style: {
                    textColor: '#000000',
                    backgroundcolor:'#ffffff'
        }
        });

        this.pageOne = new AR.ImageTrackable(this.tracker, "wifilocation_updated", {
            drawables: {
                cam: [overlayOne, label]
            },
            onImageRecognized: World.hideInfoBar,
            onError: World.onError
        });

 


Hi Chandan,


I am a bit confused here because the links you shared are projects created in Studio (and I cannot access them since they are created under your personal Studio account). So are you having issues with Wikitude Studio or are you trying to build your app using Xamarin?


Thanks

Eva

Hi Eva,


Thanks for you reply.


I am having issue with Xamarin app.

Hi,



an opacity value of 0.1 is very low and may be easily missed due to being almost fully transparent. Would you mind setting the opacity to 1 and running the app again?



- Daniel

Hello Daniel,


I have tried with Opacity 1 but the label is not visible.



 

 var imgOne = new AR.ImageResource("assets/button_one.png", {
            onError: World.onError
        });
        var overlayOne = new AR.ImageDrawable(imgOne, 1, {
            translate: {
                x: -0.2

            },
            scale: {
                x: 0.25,
                y: 0.25
            }
        });



       
        var label = new AR.Label("Hello", 10, {
            translate: { x: .25 },
            onClick: function () {
                label.text += "CLICK "
            },
            zOrder: 1,
            verticalAnchor: AR.CONST.VERTICAL_ANCHOR.TOP,
            opacity: 1,
                style: {
                    textColor: '#000000',
                    backgroundcolor:'#ffffff'
        }
        });

        this.pageOne = new AR.ImageTrackable(this.tracker, "wifilocation_updated", {
            drawables: {
                cam: [overlayOne, label]
            },
            onImageRecognized: World.hideInfoBar,
            onError: World.onError
        });

 

Good morning,



I see, I'll have to try this myself to verify. What version of the SDK are you running?



- Daniel

Hello Daniel,


Good Day!!!


I am using Xamarin.Wikitude.SDK.JS.iOS version 8.1.0.


/Chandran S

Login or Signup to post a comment