Start a new topic

AR.GeoObject() does not allow onClick event on AR.ImageDrawable and AR.HtmlDrawable

Hi,

I am building a location-based AR app using Xamarin.Forms. I have tested a couple of times on Android the AR.GeoObject that does not allow onClick event when the drawables are objects of AR.ImageDrawable or AR.HtmlDrawable


I am using the latest JavaScript SDK(7.2) for Xamarin and In fact, click event does not work on all those samples with POIs. For demonstration purposes, i have a piece of code bellow:    

 AR.context.onLocationChanged 
=  function locationChangedFn(lat, lon, alt, acc) {
         var markerDrawable_idle = new AR.ImageResource("assets/marker_idle.png");
        var markerLocation = new AR.GeoLocation(49.425518, 7.755948, 100.0);
        var markerImageDrawable_idle = new AR.ImageDrawable(markerDrawable_idle, 2.5, {
            zOrder: 0,
            opacity: 1.0,
            translate : { x: 1 },
            rotate : { z: 190 },
            onClick : function() {//this have no response
              this.rotate.z += 10;
            }
        });

        var markerObject = new AR.GeoObject(markerLocation, {
            drawables: {
                cam: [markerImageDrawable_idle]
            }
        });
    } 

    


Hi,


I was unable to reproduce this issue. Please try to activate remote debugging with chrome or safari to see if there are any errors reported in the console.

To see how this can be done please take a look at our documentation for Android or for iOS


Best Regards

Alex

Hi,

Thank you very much for the response, and after testing with the remote debugging, I came to know that the problem is with the jQuery/css used in the POI samples. For example, in the sample 08_PointOfInterest_4_SelectingPois the onClick event works well when I remove all the jQuery and css references from index.html. 


Note that I have not made any changes to the original sample, I also have tested with different versions of jQuery and css, still it does not work. I have set style background: none several times.


I need to use jQuery in my application and I am stuck at this point. Please help me with this issue.

Thanks

Hi,


since i was not able to reproduce this issue, please send me your modified AR Experience so we can take a look at it.


Best Regards,

Alex

Hi,

Thank you again for the response. I am working with the samples. Consider this sample (hselecting pois) for example, which I have not changed anything and it does not work.


I am using the latest version of the JS SDK (7.2) on Xamarin platform and I have a sony experia z2 device. I also have checked it with the Wikitude App. It works fine there with the same device.


best regards

Eid



Hi,


we are still unable to reproduce this issue, the selecting pois sample worked fine on our tests with xamarin. We do not have the Xperia Z2 at the office, but it was tested with the Xperia Z3. 


Best Regards,

Alex

Login or Signup to post a comment