Sie sind nicht angemeldet.

1

Montag, 25. Oktober 2010, 13:18

onclick="looktohotspot" not working on all hotspots

hi all,

trying to get "looktohotspot" to work on this pano:

Nottingham High School

all work, except one - the Music School. When clicked, viewer pans to look at, but fails to zoom in. What am I doing wrong? This in fact did this for 3 other hotspots, which I deleted. The skin is here:

default skin

any help & guidance gratefully appreciated.

thanks

Stu

2

Montag, 25. Oktober 2010, 15:46

Not sure if it matters, but you have this in your xml

Quellcode

1
<!-- Music School 0xbedbeb --->

which is resulting in a malformed xml.
Change it to

Quellcode

1
<!-- Music School 0xbedbeb -->

3

Montag, 25. Oktober 2010, 17:46

I think this is a bug in the looktohotspot function. This seems to be happening because the ath coordinates are crossing over from negative numbers (> -180) to positive (< 180) which is of course correct, but prevents the looktohotspot function from zooming in as it seems to think the hotspot is infinitely large. I've seen this happen also when the range of values for ath is greater than 360 degrees in a polygonal hotspot.

Try changing

Quellcode

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
	<hotspot name="hs9"
	         keep="false"
	         visible="true" enabled="true" handcursor="true" capture="true" children="true"
 	         zorder="0"
	         fillcolor     ="0xbedbeb" fillalpha     ="0.30" borderwidth     ="2.0" bordercolor     ="0xbedbeb" borderalpha     ="1.00"
	         fillcolorhover="0x000000" fillalphahover="0.00" borderwidthhover="0.0" bordercolorhover="0x000000" borderalphahover="0.00"
	         fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
	         onover=""
	         onhover="showtext(Music School,STYLE3);"
	         onout=""
	         ondown=""
	         onup=""
	         onclick="looktohotspot(hs9,auto,smooth(150,25,100));"
	         details="8"
	         effect=""
	         flying="0"
	         inverserotation="false"
	         usecontentsize="false"
		>
		<point ath="177.5256" atv=" 60.1226" />
		<point ath="-179.7379" atv=" 59.8629" />
		<point ath="-178.9646" atv=" 60.7011" />
		<point ath="-172.6049" atv=" 58.7765" />
		<point ath="-152.4837" atv=" 51.5747" />
		<point ath="-152.1610" atv=" 48.7715" />
		<point ath="-159.7837" atv=" 44.7972" />
		<point ath="-167.8716" atv=" 47.7877" />
		<point ath="-169.2918" atv=" 46.2853" />
		<point ath="-173.2808" atv=" 47.3465" />
		<point ath="-173.2689" atv=" 47.7154" />
		<point ath="176.5629" atv=" 49.5501" />
		<point ath="176.5340" atv=" 50.5664" />
		<point ath="174.9545" atv=" 50.7693" />
		<point ath="174.1617" atv=" 54.3659" />
		<point ath="174.2000" atv=" 54.3711" />
		<point ath="175.2154" atv=" 56.6504" />
	</hotspot>
to

Quellcode

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
	<hotspot name="hs9"
	         keep="false"
	         visible="true" enabled="true" handcursor="true" capture="true" children="true"
 	         zorder="0"
	         fillcolor     ="0xbedbeb" fillalpha     ="0.30" borderwidth     ="2.0" bordercolor     ="0xbedbeb" borderalpha     ="1.00"
	         fillcolorhover="0x000000" fillalphahover="0.00" borderwidthhover="0.0" bordercolorhover="0x000000" borderalphahover="0.00"
	         fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
	         onover=""
	         onhover="showtext(Music School,STYLE3);"
	         onout=""
	         ondown=""
	         onup=""
	         onclick="looktohotspot(hs9,auto,smooth(150,25,100));"
	         details="8"
	         effect=""
	         flying="0"
	         inverserotation="false"
	         usecontentsize="false"
		>
		<point ath="177.5256" atv="60.1226" />
		<point ath="180.2621" atv="59.8629" />
		<point ath="181.0354" atv="60.7011" />
		<point ath="187.3951" atv="58.7765" />
		<point ath="207.5163" atv="51.5747" />
		<point ath="207.8390" atv="48.7715" />
		<point ath="200.2163" atv="44.7972" />
		<point ath="192.1284" atv="47.7877" />
		<point ath="190.7082" atv="46.2853" />
		<point ath="186.7192" atv="47.3465" />
		<point ath="186.7311" atv="47.7154" />
		<point ath="176.5629" atv="49.5501" />
		<point ath="176.5340" atv="50.5664" />
		<point ath="174.9545" atv="50.7693" />
		<point ath="174.1617" atv="54.3659" />
		<point ath="174.2000" atv="54.3711" />
		<point ath="175.2154" atv="56.6504" />
	</hotspot>

4

Montag, 25. Oktober 2010, 18:44

Yes i have same problem...
I solved this with additional finction, and set ath and atv for each hotspot *unsure*
I'm not sure that is right way but its working *cool*
you can see it in this tour http://webpokaz.ru/824003/html/

Quellcode

1
2
3
4
5
6
7
8
9
<hotspot name="ehs" url="ehs.png" ath="-20" atv="43" /> <!-- empty hotspot for looking  -->
<hotspot name="hs1"
 	...
 	onclick="looktohotspot(ehs)"
 	...>
	<point ath="-56.1599" atv=" 60.3620" />
	... many points ...
	<point ath="-54.1590" atv=" 60.7598" />
</hotspot>
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

5

Montag, 8. November 2010, 16:47

I think this is a bug in the looktohotspot function. This seems to be happening because the ath coordinates are crossing over from negative numbers (> -180) to positive (< 180) which is of course correct, but prevents the looktohotspot function from zooming in as it seems to think the hotspot is infinitely large. I've seen this happen also when the range of values for ath is greater than 360 degrees in a polygonal hotspot.

Try changing

Quellcode

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
<hotspot name="hs9"
         keep="false"
         visible="true" enabled="true" handcursor="true" capture="true" children="true"
          zorder="0"
         fillcolor     ="0xbedbeb" fillalpha     ="0.30" borderwidth     ="2.0" bordercolor     ="0xbedbeb" borderalpha     ="1.00"
         fillcolorhover="0x000000" fillalphahover="0.00" borderwidthhover="0.0" bordercolorhover="0x000000" borderalphahover="0.00"
         fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
         onover=""
         onhover="showtext(Music School,STYLE3);"
         onout=""
         ondown=""
         onup=""
         onclick="looktohotspot(hs9,auto,smooth(150,25,100));"
         details="8"
         effect=""
         flying="0"
         inverserotation="false"
         usecontentsize="false"
>
<point ath="177.5256" atv=" 60.1226" />
<point ath="-179.7379" atv=" 59.8629" />
<point ath="-178.9646" atv=" 60.7011" />
<point ath="-172.6049" atv=" 58.7765" />
<point ath="-152.4837" atv=" 51.5747" />
<point ath="-152.1610" atv=" 48.7715" />
<point ath="-159.7837" atv=" 44.7972" />
<point ath="-167.8716" atv=" 47.7877" />
<point ath="-169.2918" atv=" 46.2853" />
<point ath="-173.2808" atv=" 47.3465" />
<point ath="-173.2689" atv=" 47.7154" />
<point ath="176.5629" atv=" 49.5501" />
<point ath="176.5340" atv=" 50.5664" />
<point ath="174.9545" atv=" 50.7693" />
<point ath="174.1617" atv=" 54.3659" />
<point ath="174.2000" atv=" 54.3711" />
<point ath="175.2154" atv=" 56.6504" />
</hotspot>
to

Quellcode

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
<hotspot name="hs9"
         keep="false"
         visible="true" enabled="true" handcursor="true" capture="true" children="true"
          zorder="0"
         fillcolor     ="0xbedbeb" fillalpha     ="0.30" borderwidth     ="2.0" bordercolor     ="0xbedbeb" borderalpha     ="1.00"
         fillcolorhover="0x000000" fillalphahover="0.00" borderwidthhover="0.0" bordercolorhover="0x000000" borderalphahover="0.00"
         fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
         onover=""
         onhover="showtext(Music School,STYLE3);"
         onout=""
         ondown=""
         onup=""
         onclick="looktohotspot(hs9,auto,smooth(150,25,100));"
         details="8"
         effect=""
         flying="0"
         inverserotation="false"
         usecontentsize="false"
>
<point ath="177.5256" atv="60.1226" />
<point ath="180.2621" atv="59.8629" />
<point ath="181.0354" atv="60.7011" />
<point ath="187.3951" atv="58.7765" />
<point ath="207.5163" atv="51.5747" />
<point ath="207.8390" atv="48.7715" />
<point ath="200.2163" atv="44.7972" />
<point ath="192.1284" atv="47.7877" />
<point ath="190.7082" atv="46.2853" />
<point ath="186.7192" atv="47.3465" />
<point ath="186.7311" atv="47.7154" />
<point ath="176.5629" atv="49.5501" />
<point ath="176.5340" atv="50.5664" />
<point ath="174.9545" atv="50.7693" />
<point ath="174.1617" atv="54.3659" />
<point ath="174.2000" atv="54.3711" />
<point ath="175.2154" atv="56.6504" />
</hotspot>
Hi pinsane,

thanks for the tip - seemed to do the trick....:

www.360imagery.co.uk/VT/aerial/nottingha…igh_school.html

thanks

Stu

6

Mittwoch, 10. November 2010, 16:17

Hi,

right, this is a bug in the hotspot size calculation,
it will be fixed in the next release,

best regards,
Klaus