0

I'm able to launch Wikitude POI sample using my Android phone. I have tried to create my own WCF to retrieve geolocation data. Whenever I retrieve my own geolocation data, the marker will not display on my screen. But, if I use the geolocation data from the sample itself, markers will show on my screen.

I'm sure that, my $.ajax able to get my own geolocation data. But not able to display it. How do I verify that? Display all the geolocation data I have retrieved on the phone screen. Next, what I did is

  1. Display my current geolocation on my phone screen (Latitude: 3.1229609, Longitude: 101.6345425)
  2. Use my browser to confirm again my geolocation
  3. Instead of render all the markers from the data retrieved from wikitude, I hardcoded only 1 geolocation data which available from the sample data. (Marker 1, "longitude":"0.045","latitude":"0.056")
  4. I hardcode another geolocation which is nearest to me. (Marker 2, Latitude: 3.116562, Longitude: 101.646538)

Only Marker1 being rendered on my screen. Regardless how or where I move my phone camera to, i still couldn't find Marker2.

I'm wondering, is wikitude POI location same as geolocation in google maps?

WenHao
  • 1,183
  • 1
  • 15
  • 46

1 Answers1

0

Try assigning a function to the onLocationChanged trigger and output the current location. This is the location used by the WikitudeSDK.

AR.context.onLocationChanged = function(lat,lon,alt,acc) 
                               { alert("lat: " + lat + ", lon: " + lon };

Additionally you can check if the correct location is reported by setting a breakpoint in Java code at AbstractArchitectCam's anonymous LocationListener class' onLocationChanged method.

Marker 2 won't show up if the location is too far away (which it appears to be as Marker 1 is visible).

Disclaimer: I work for Wikitude.

wulfgeng
  • 585
  • 4
  • 8