I am using the wikitude SDK for an iOS app. I have POI's placed as geoobjects and want to be able to display additional information about them when they are tapped. Due to the need for interactivity I need to know which POI was tapped on the Obj-C side of things rather than JS. My question therefore is how to call an Obj-C function when the JS senses that one of the POI's has been tapped. It will also need to pass which object was tapped and therefore needs to be able to accept arguments. Is this possible and if so, how?
Thanks
N
Nicola Radacher
said
over 7 years ago
Hi,
Did you check the Native Detail screen sample - which explains the communication between the native and the js part.
Greetings
Nicola
G
Guillaume Sparrow-Pepin
said
over 7 years ago
I have looked at that sample. The code I have currently looks like this:
var markerObject = new AR.GeoObject(markerLocation, { drawables: {cam: , radar: radarImage }, onClick: self.poiTapped(poiData.assetID) } });
The problem is that the onClick function is not getting called when the geoObject is tapped. What is more confusing is that the poiTapped function does get called when the AR view is loading. It gets called once for each POI that exists in the AR view, but will never get called again. The POI tapped function looks like this:
Sharon David