You are not logged in.

1

Wednesday, November 5th 2008, 12:11am

radar orientation

Hi,
i am not able to orient the radar on the good direction.
on first load the radar must be at 90┬░showing the map's top.
How can i set this correctly ?
Thanks !

This post has been edited 1 times, last edit by "gab696" (Nov 5th 2008, 12:41pm)


2

Wednesday, November 5th 2008, 12:31am

i have found by myself...
this is set by the heading param:
set(plugin[radar].heading,-90);

3

Wednesday, November 5th 2008, 1:24pm

Hi,

your code is correct

here is also a small tip that helps finding the correct heading:

1. include the options plugin to see the current hlookat value

2. set radar heading to "0"

3. look at a object on pano and notice the hlookat value
(e.g. hlookat_view = 31)

4. move the radar to point to the same object on the map and notice the hlookat value agagin
(e.g. hlookat_map = -164)

5. now the heading can be calculated:

heading = hlookat_map - hlookat_view
(e.g. heading = -164 - 31 = -195)

6. if you want (but thats not necessary) you can adjust the heading to be in range 0..360
by adding or substracting +360/-360 until the heading is in the range
(e.g. heading = -195+360 = 165)

I hope this helps a little bit, later I will also add a something to adjust the heading direct,

regards,
Klaus

Virtual Northland

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

4

Wednesday, November 5th 2008, 6:24pm

I will try this as well. I am the poster on the Google Groups forum asking about the radar issues. Will report back if it works.





www.virtualnorthland.com (work in progress)

This post has been edited 1 times, last edit by "Virtual Northland" (Nov 5th 2008, 6:51pm)


Virtual Northland

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

5

Thursday, November 6th 2008, 3:33am

well i updated to the new 1.0.7 and tried the setting above to get the radar in sync and it did not work. it seems it does not matter what setting i choose it always starts in the same direction. the radar heading does nothing for me the pano acts the same with that part of the code missing. it is like it is not even being read. anyone have any ideas?

6

Thursday, November 6th 2008, 5:14pm

do you test online or offline?

when you test online you should clear the browser cache after each xml update,

can you also post a link or the code?

regards,
Klaus

Virtual Northland

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

7

Friday, November 7th 2008, 5:31pm

I was testing offline and was not aware of the need to refresh after clearing IE cache will start doing so. Here is the modified code with the radar still not working, http://pastie.org/309604 please let me know if i am still codingthings wrong.

8

Friday, November 7th 2008, 9:42pm

Hi,

the radar code looks okay (you set all headings to "180", that means e.g. when hlookat is "0" the radar should point to west)
but there there a two <preview> and <image> tags,
and in the <data name="html1"> tag the

Source code

1
<img src=" fi_logo.jpg" />

looks not okay, I think the blank before "fi_logo.jpg" must be removed, e.g.:

Source code

1
<img src="fi_logo.jpg" />


regards,
Klaus

ZODIACBLUE

Beginner

Posts: 37

Location: Brighton, UK

Occupation: Photographer

  • Send private message

9

Tuesday, August 4th 2009, 5:57pm

Radar orientation continued

I have been struggling with this for some time now. Seem to have solved all my tour issues and XML coding apart from this.
started trying to change values in following code example

Source code

1
2
3
4
5
6
7
 <action name="load1"> 
set(plugin[spotx].x,116); 
set(plugin[spotx].y,180); 
set(plugin[radar].heading,90); 
set(plugin[radar].x,116); 
set(plugin[radar].y,180); 
loadpano(preston1.xml,null,KEEPALL,BLEND(1));

But to no avail then though it might be the keepall function causing the problem so changed it to blend still nothing I am completly lost now as seem to have tried everything the full code ofr this page is as follows

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<krpano version="1.0.8" onstart="action(load1);"> 

<textstyle name="DEFAULT" font="Arial" fontsize="16" textcolor="0xFFFFFF" border="false" background="false" effect="glow(0x000000,0.7,4,2);dropshadow(4,45,0x000000,4,1);"/> 
<textstyle name="smalltext" 
font="Arial" fontsize="10" 
border="false" background="false" 
textcolor="0xFFFFFF" 
effect="glow(0x000000,0.7,4,2);dropshadow(2,45,0x000000,3,1);" 
/> 
<plugin name="map" url="prestondata/parkmap.png" zorder="1" align="righttop" x="10" y="10" handcursor="false" keep="true" 
onclick="action(closemap);" 
onhover="showtext(Close Preston Manor Tour Map,smalltext);" 
/> 


<plugin name="spot1" url="prestondata/mappoint.png" zorder="2" align="righttop" edge="center" keep="true" x="116" y="180" onhover="showtext(The Gardens);" onclick="action(load1);" /> 
<plugin name="spot2" url="prestondata/mappoint.png" zorder="2" align="righttop" edge="center" keep="true" x="128" y="140" onhover="showtext(The Lawns);" onclick="action(load2);" /> 
<plugin name="spot3" url="prestondata/mappoint.png" zorder="2" align="righttop" edge="center" keep="true" x="142" y="85" onhover="showtext();" onclick="action(load3);" /> 
<plugin name="spot4" url="prestondata/mappoint.png" zorder="2" align="righttop" edge="center" keep="true" x="95" y="75" onhover="showtext();" onclick="action(load4);" /> 
<plugin name="spot5" url="prestondata/mappoint.png" zorder="2" align="righttop" edge="center" keep="true" x="85" y="115" onhover="showtext();" onclick="action(load5);" /> 
<plugin name="spot6" url="prestondata/mappoint.png" zorder="2" align="righttop" edge="center" keep="true" x="97" y="65" onhover="showtext();" onclick="action(load6);" /> 
<plugin name="spot7" url="prestondata/mappoint.png" zorder="2" align="righttop" edge="center" keep="true" x="105" y="30" onhover="showtext();" onclick="action(load7);" /> 
<plugin name="spot8" url="prestondata/mappoint.png" zorder="2" align="righttop" edge="center" keep="true" x="152" y="40" onhover="showtext();" onclick="action(load8);" /> 
<plugin name="spot9" url="prestondata/mappoint.png" zorder="2" align="righttop" edge="center" keep="true" x="200" y="50" onhover="showtext();" onclick="action(load9);" /> 
<plugin name="spot10" url="prestondata/mappoint.png" zorder="2" align="righttop" edge="center" keep="true" x="192" y="95" onhover="showtext();" onclick="action(load10);" /> 
<plugin name="spot11" url="prestondata/mappoint.png" zorder="2" align="righttop" edge="center" keep="true" x="184" y="140" onhover="showtext();" onclick="action(load11);" /> 
<plugin name="spot12" url="prestondata/mappoint.png" zorder="2" align="righttop" edge="center" keep="true" x="225" y="100" onhover="showtext();" onclick="action(load12);" /> 


<!-- first hotpot --> 
<plugin name="spotx" url="prestondata/mappointactive.png" zorder="4" align="righttop" edge="center" keep="true" x="116" y="180" /> 

<!-- radar plugin, set heading with "plugin[radar].heading" --> 
<plugin name="radar" url="prestondata/radar.swf" zorder="3" align="righttop" edge="center" keep="true" x="116" y="180" width="60" height="60" /> 


<action name="startloading"> 
set(hotspot.visible,false); 
push(view.fovmin); 
set(view.fovmin,1); 
</action> 

<action name="loadingdone"> 
pop(view.fovmin); 
set(hotspot.visible,true); 
</action> 

<action name="lookinterrupt"> 
action(loadingdone); 
breakall(); 
</action> 
<action name="load1"> 
set(plugin[spotx].x,116); 
set(plugin[spotx].y,180); 
set(plugin[radar].heading,90); 
set(plugin[radar].x,116); 
set(plugin[radar].y,180); 
loadpano(preston1.xml,null,KEEPALL,BLEND(1)); 

</action> 


<action name="load2"> 
set(plugin[spotx].x,128); 
set(plugin[spotx].y,140); 
set(plugin[radar].heading,180); 
set(plugin[radar].x,128); 
set(plugin[radar].y,140); 
loadpano(preston2.xml,null,KEEPALL,BLEND(1)); 

</action> 
<action name="load3"> 
set(plugin[spotx].x,142); 
set(plugin[spotx].y,85); 
set(plugin[radar].heading,-170); 
set(plugin[radar].x,142); 
set(plugin[radar].y,85); 
loadpano(preston3.xml,null,KEEPALL,BLEND(1)); 
</action> 


<action name="load4"> 
set(plugin[spotx].x,95); 
set(plugin[spotx].y,75); 
set(plugin[radar].x,95); 
set(plugin[radar].y,75); 
loadpano(preston4.xml,null,KEEPALL,BLEND(2)); 
set(plugin[radar].heading,270); 
</action> 
<action name="load5"> 
set(plugin[spotx].x,85); 
set(plugin[spotx].y,115); 
set(plugin[radar].x,85); 
set(plugin[radar].y,115); 
loadpano(preston5.xml,null,KEEPALL,BLEND(2)); 
set(plugin[radar].heading,12); 
</action> 


<action name="load6"> 
set(plugin[spotx].x,97); 
set(plugin[spotx].y,65); 
set(plugin[radar].x,97); 
set(plugin[radar].y,65); 
loadpano(preston6.xml,null,KEEPALL,BLEND(2)); 
set(plugin[radar].heading,270); 
</action> 
<action name="load7"> 
set(plugin[spotx].x,105); 
set(plugin[spotx].y,30); 
set(plugin[radar].x,105); 
set(plugin[radar].y,30); 
loadpano(preston7.xml,null,KEEPALL,BLEND(2)); 
set(plugin[radar].heading,12); 
</action> 


<action name="load8"> 
set(plugin[spotx].x,152); 
set(plugin[spotx].y,40); 
set(plugin[radar].x,152); 
set(plugin[radar].y,40); 
loadpano(preston8.xml,null,KEEPALL,BLEND(2)); 
set(plugin[radar].heading,270); 
</action> 
<action name="load9"> 
set(plugin[spotx].x,200); 
set(plugin[spotx].y,50); 
set(plugin[radar].x,200); 
set(plugin[radar].y,50); 
loadpano(preston9.xml,null,KEEPALL,BLEND(2)); 
set(plugin[radar].heading,12); 
</action> 


<action name="load10"> 
set(plugin[spotx].x,192); 
set(plugin[spotx].y,95); 
set(plugin[radar].x,192); 
set(plugin[radar].y,95); 
loadpano(preston10.xml,null,KEEPALL,BLEND(2)); 
set(plugin[radar].heading,270); 
</action> 
<action name="load11"> 
set(plugin[spotx].x,184); 
set(plugin[spotx].y,140); 
set(plugin[radar].x,184); 
set(plugin[radar].y,140); 
loadpano(preston11.xml,null,KEEPALL,BLEND(2)); 
set(plugin[radar].heading,12); 
</action> 


<action name="load12"> 
set(plugin[spotx].x,225); 
set(plugin[spotx].y,100); 
set(plugin[radar].x,225); 
set(plugin[radar].y,100); 
loadpano(preston0.xml,null,KEEPALL,BLEND(2)); 
set(plugin[radar].heading,270); 
</action> 

<action name="showspots"> 
set(plugin[spot1].alpha,0); 
set(plugin[spot2].alpha,0); 
set(plugin[spot3].alpha,0); 
set(plugin[spot4].alpha,0); 
set(plugin[spot5].alpha,0); 
set(plugin[spot6].alpha,0); 
set(plugin[spot7].alpha,0); 
set(plugin[spot8].alpha,0); 
set(plugin[spot9].alpha,0); 
set(plugin[spot10].alpha,0); 
set(plugin[spot11].alpha,0); 
set(plugin[spot12].alpha,0); 
set(plugin[spotx].alpha,0); 
set(plugin[radar].alpha,0); 
set(plugin[spot1].visible,true); 
set(plugin[spot2].visible,true); 
set(plugin[spot3].visible,true); 
set(plugin[spot4].visible,true); 
set(plugin[spot5].visible,true); 
set(plugin[spot6].visible,true); 
set(plugin[spot7].visible,true); 
set(plugin[spot8].visible,true); 
set(plugin[spot9].visible,true); 
set(plugin[spot10].visible,true); 
set(plugin[spot11].visible,true); 
set(plugin[spot12].visible,true); 
set(plugin[spotx].visible,true); 
set(plugin[radar].visible,true); 

tween(plugin[spot1].alpha,1); 
tween(plugin[spot2].alpha,1); 
tween(plugin[spot3].alpha,1); 
tween(plugin[spot4].alpha,1); 
tween(plugin[spot5].alpha,1); 
tween(plugin[spot6].alpha,1); 
tween(plugin[spot7].alpha,1); 
tween(plugin[spot8].alpha,1); 
tween(plugin[spot9].alpha,1); 
tween(plugin[spot10].alpha,1); 
tween(plugin[spot11].alpha,1); 
tween(plugin[spot12].alpha,1); 
tween(plugin[spotx].alpha,1); 
tween(plugin[radar].alpha,1); 
</action> 

<action name="hidespots"> 
set(plugin[spot1].visible,false); 
set(plugin[spot2].visible,false); 
set(plugin[spot3].visible,false); 
set(plugin[spot4].visible,false); 
set(plugin[spot5].visible,false); 
set(plugin[spot6].visible,false); 
set(plugin[spot7].visible,false); 
set(plugin[spot8].visible,false); 
set(plugin[spot9].visible,false); 
set(plugin[spot10].visible,false); 
set(plugin[spot11].visible,false); 
set(plugin[spot12].visible,false); 
set(plugin[spotx].visible,false); 
set(plugin[radar].visible,false); 
</action> 
<action name="closemap"> 
action(hidespots); 
set(plugin[map].onhover,showtext(Open Preston Manor Tour Map,smalltext);); 
set(plugin[map].onclick,action(openmap);); 
tween(plugin[map].width,32,distance(230,0.5),easeoutquad); 
tween(plugin[map].height,32,distance(196,0.5),easeoutquad); 
</action> 

<action name="openmap"> 
set(plugin[map].onhover,showtext(Close Preston Manor Tour Map,smalltext);); 
set(plugin[map].onclick,action(closemap);); 
tween(plugin[map].width,230,distance(230,0.5),easeoutquad); 
tween(plugin[map].height,196,distance(196,0.5),easeoutquad,action(showspots);); 
</action> 
</krpano>


Would really aprreciate any input into this it's very frustrating that once you think you understand evrything it then doesn't work.

10

Wednesday, August 5th 2009, 11:21pm

Hi,

the code itself looks okay,
can you post a link to the online example?

maybe this would help too - here is a new example for a simple tour with a radar:
http://krpano.com/forum/wbb/index.php?pa…D=6712#post6712

best regards,
Klaus

Similar threads