Wikitude
play_for_work
Forum
FAQ
Documentation
Download
wikitude.com
How can we help you today?
Enter your search term here...
Search
Start a new topic
Discussions
Wikitude SDK (Android, iOS, UWP)
Wikitude SDK Questions or Problems
Problem with radar
p
pxtcon
started a topic
almost 10 years ago
Problem with radar
3 Comments
Oldest First
Popular
Newest First
Sorted by
Popular
M
Massimo Perna
said
almost 10 years ago
hallo,
here's the code i try to use to show up radar in ARchitect:
<script src="architect://architect.js"></script>
<script type="text/javascript">
AR.radar.background = new AR.ImageResource("radarImg.png");
AR.radar.positionX = 0.1;
AR.radar.positionY = 0.1;
AR.radar.width = 0.4;
AR.radar.centerX = 0.5;
AR.radar.centerY = 0.5;
AR.radar.radius = 0.4;
AR.radar.northIndicator.image = new AR.ImageResource("north_arrow.png");
AR.radar.northIndicator.radius = 0.4;
AR.radar.onClick = function(){ AR.logger.info(?radar was clicked?);};
AR.radar.enabled = true;
</script>
<script type="text/javascript">
function createLabelAtLocation(mygeolocation)
{
var radarCircle = new AR.Circle(0.05, { style: {fillColor: '#83ff7b'}});
var myStyle = {fillColor : '#FF0000', outlineSize : 30, outlineColor : '#000000'};
var Mycircle = new AR.Circle(1, {style : myStyle});
var mygeolocation = new AR.GeoLocation(yy.yyyyyyyyy, xx.xxxxxxx, 0);
var geoObject = new AR.GeoObject(mygeolocation, {drawables: {cam: Mycircle, radar: radarCircle}});
}
function setupScene()
{
createLabelAtLocation();
}
</script>
</head>
<body onload="setupScene()">
</body>
but got no radar on the screen. Can you help me please?!?!
Thank you
M
Markus Eder
said
almost 10 years ago
Hi There!
First of all thank you for your interest in our SDK.
I tried out your code and it seems like you had a syntax error in your Log message for the Radar clicking
Try to change:
AR.radar.onClick = function(){ AR.logger.info(?radar was clicked?);};
to
AR.radar.onClick = function(){ AR.logger.info("radar was clicked");};
Let me know if that helped.
Thx, Markus
M
Massimo Perna
said
almost 10 years ago
now it works!
Thank you!!
Login
or
Signup
to post a comment
More topics in
Wikitude SDK Questions or Problems
Instatiation of WTArchitectView compile errors
Point of interest - native iOS
Slider
Camera lagging / slow in native Swift application
Create a web service
N-th ImageDrawable not displayed
Radar Example
stop defaultlocationmanager and use architectview.injectlocation ios 10
WTC Size Limit
AngularJS and wikitude
See all 3869 topics
© 2021 Wikitude, a Qualcomm company
pxtcon