Start a new topic

POI not displayed

POI not displayed


Hi, 

I just started learning wikitude. I'm trying to create POI. 

this is what i wrote, and its not displaying anything on the camera. Can you tell me what is wrong with this code??

Thanks in advance.

----------------------------------------- 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

 

<head>

<meta name="viewport" content="target-densitydpi=device-dpi, width = 740, user-scalable = 0" />

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>ciclepoi</title>

<script src="architect://architect.js"></script>

<script type="text/javascript" src="../ade.js"></script>

</head>

 

<body>

<script>

AR.context.onLocationChanged = function(lat, lon, alt, acc)

 { alert("lat: " + lat + ", lon: " + lon };

        var loc = new AR.RelativeLocation(null,10,0,0);

  

    var myCircle = new AR.Circle(5, {style: {fillColor: '#FFC100'}});

    var myGeoObject = new AR.GeoObject(loc, {drawables: {cam:mycircle}});

 

AR.context.onLocationChanged = null;

// Hide loading message

document.getElementById("messageElement").style.display="none";

 

</script>

 

</body>

</html>

You have 2 syntax errors in the posted js:

Uncaught SyntaxError: Unexpected token } index.html:15

 

and a missing closing bracket.

 

You can use the ade.js included with the SDK to debug your javascript code in a desktop browser. This will allow you to find and fix all js errors before trying it on the device.

 
Login or Signup to post a comment