You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, November 27th 2011, 3:31pm

Does it work?

Please, could you try it, I don't have the device to test myself:

http://www.marcolanciani.com/test-villaflora/

What about ipad/iphone? Does it work?
- Is it possible to see the text when hovering?
- Is it possible to open the map and see it all in such a small screen?
- Does it work language change?

I'm also having a problem with the names of the panos in the combobox.
- When I change pano from the map, the name in the combobox doesn't change. There must be an error in the code...

set(plugin[combobox].caption,8572);

Thanks,
Marco

mindlessboss

Professional

Posts: 1,082

Location: Russia, Kaliningrad

  • Send private message

2

Sunday, November 27th 2011, 4:46pm

Hello!
BTW - You can check your tour yourself, by iphone-ipad-simulator.html
you can find it in krpano package

Regards
Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

3

Sunday, November 27th 2011, 5:48pm

Hello Andrey,

the iphone-ipad-simulator.html doesn't work... I copied it in the tour folder, and changed the xml path, but don't understand how to change the js path. I tried many combinations but I get always a fatal error.
Attached is an image of the tour folder.



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
<!DOCTYPE html>
<html>
<head>
	<title>krpano iPhone/iPad Simulator</title>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<style>
		body { font-family:Arial,Helvetica,sans-serif;color:#FFFFFF;background-color:#000000;overflow-y:scroll; -webkit-user-select:none; }
		.button { padding:2px 6px 2px 6px;margin:6px;border:1px solid gray;cursor:pointer;-moz-border-radius:6px;border-radius:6px;-moz-box-shadow:0px 0px 5px gray;-webkit-box-shadow:0px 0px 5px gray; box-shadow:0px 0px 5px gray; }
	</style>
</head>
<body>

	<div style="text-align:center;font-size:20px;padding:8px;">
		<b>krpano iPhone/iPad Simulator</b>
		<span style="font-size:12px;">(for testing krpano layouts)</span>
	</div>

	<div style="text-align:center;padding:16px;font-size:14px;">
		Select Device:
		<span class="button" onclick="selectdevice(0);">iPhone Portrait</span>
		<span class="button" onclick="selectdevice(1);">iPhone Landscape</span>
		<span class="button" onclick="selectdevice(2);">iPad Portrait</span>
		<span class="button" onclick="selectdevice(3);">iPad Landscape</span>
	</div>

	<div id="device" style="position:relative;left:50%;top:0px;width:0px;height:0px;">

		<img id="devicebg" src="" style="position:absolute;left:-160px;top:0px;width:320px;height:480px;z-index:1; -moz-border-radius:6px; border-radius:6px; -moz-box-shadow:0px 0px 8px #FFFFFF; -webkit-box-shadow:0px 0px 8px #FFFFFF; box-shadow: 0px 0px 8px #FFFFFF;" />

		<div id="krpanoDIV" style="position:absolute;left:-160px;top:20px;width:320px;height:416px;;z-index:2;">
			<noscript><table style="width:100%;height:100%;"><tr style="valign:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript>
			<div id="nonsafariinfos" style="display:none;position:absolute;width:100%;height:100%;"><table width="100%" height="100%"><tr valign="middle"><td><center><a href="http://www.apple.com/safari/download/" target="_blank"><img src="http://www.browserchoice.eu/Resources/Images/Safari_logo.jpg" style="border:0; -moz-border-radius:5px; border-radius:5px;" alt="Get Safari" /></a><br/><br/>Safari only!<br/></center></td></tr></table></div>
		</div>

	</div>

	<div id="infos" style="position:absolute;left:50%;width:0px;top:600px;">
		<div style="position:absolute;left:-230px;text-align:left;font-size:16px;padding:2px;width:460px;">
			<b>How to use the krpano iPhone/iPad Simulator?</b>
			<ul style="font-size:14px;margin:2px;padding-left:18px;">
				<li>Copy the "iphone-ipad-simulator.html" to your pano folder.</li>
				<li>Adjust the .js and .xml paths inside the "iphone-ipad-simulator.html".</li>
			</ul>
			<br/>
		</div>
	</div>


	<!-- path to the krpano viewer files (keep the file order!) -->
	<script src="swfkrpano.js"></script>
	<script src="krpanoiphone.license.js"></script>
	<script src="krpanoiphone.js"></script>


	<script>

		var bg_iphone4_portrait  = null;
		var bg_iphone4_landscape = null;
		var bg_ipad_portrait  = null;
		var bg_ipad_landscape = null;

		loadembeddedgraphics();

		var viewerdevice = null;
		var browserokay = false;

		// browser check
		{
			var ua = navigator.userAgent.toLowerCase();

			if (ua.indexOf("safari") > 0)
			{
				ind = ua.indexOf("version");
				if (ind > 0)
				{
					var ver = parseInt(ua.slice(ind+8));
					if (ver >= 5)
						browserokay = true;
					else
					{
						if(ua.indexOf("ipad") >= 0 || ua.indexOf("iphone") >= 0 || ua.indexOf("ipod") >= 0)
							browserokay = true;
					}
				}
			}

			if (browserokay == false)
			{
				document.getElementById("nonsafariinfos").style.display = "inline";
			}
		}

		selectdevice(0);


		function reloadkrpano(device)
		{
			if (browserokay)
			{
				if (device != viewerdevice)
				{
					viewerdevice = device;

					var krpano = document.getElementById("krpanoSWFObject");
					if (krpano && krpano.unload)
					{
						krpano.unload();
					}

					var viewer = createkrpanoJSviewer("krpanoSWFObject",null,null,null,false);
					viewer.addVariable("simulatedevice", viewerdevice);

					<!-- path to the xml file -->
					if (device == "iphone")
						viewer.addVariable("xml", "8572.xml");
					else if (device == "ipad")
						viewer.addVariable("xml", "8572.xml");

					viewer.embed("krpanoDIV");
				}
			}
		}


By the way, I'm still having a problem with the combobox in the desktop version:

- When I change pano from the map, the name in the combobox doesn't change. There must be an error in the code...

set(plugin[combobox].caption,8572);

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
    <action name="8572">
        
        loadpano(8572.xml,null,MERGE,BLEND(3));
        lookat(get(panoview.h),get(panoview.v),get(panoview.fov));

		set(plugin[combobox].caption,8572);
		        
        set(plugin[radar].x,241);
        set(plugin[radar].y,246);
        set(plugin[radar].heading,50);

        action(closemap);

    </action>


Thanks,
Marco

mindlessboss

Professional

Posts: 1,082

Location: Russia, Kaliningrad

  • Send private message

4

Monday, November 28th 2011, 1:22am

Hi!
Very defecult to read code here.
Better show online
If you get fatal xml error text on black screeen in simulator
then you need to check your code carefully.
It can be double attribute in some node
for example
plugin name="pl1" url="someurl" alpha="0.5" keep="true" alpha="0.5"
this makes error (alpha twice)

About simulator - you can put js code directly to html in script tag
it's works fine for me

Regards

Andrey *thumbup*
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

Monday, November 28th 2011, 3:09am

If you mean, very difficult to read the code at 02:00am, I agree! *g*

Actually the code in the first pane is that from the "iphone-ipad-simulator.html" where I just replaced the path to my XML. You can see this at line 115 and 117: is this correct to make the "iphone-ipad-simulator.html" file work?

Only thing left is to change the paht of the original JS file with my JS file, which is 8572.js:
- the problem is, I don't know which line I have to put it in.
- second problem: do I have only to add my 8572.js javascript file somewhere in the "iphone-ipad-simulator.html" or I have to replace part of the code in the "iphone-ipad-simulator.html"?

I'm asking because there's not enough documentation on how to use the "iphone-ipad-simulator.html" file. I guess I'm missing something that was supposed to be known. *unsure*

Following a picture with the error:



If this can help you understand my problem, you can see a picture of the folder content of the virtual tour in the previous post.
The VT is already online:

http://www.marcolanciani.com/test-villaflora/

Regards,
Marco

This post has been edited 1 times, last edit by "marco.lanciani" (Nov 28th 2011, 3:39am)


6

Monday, November 28th 2011, 4:39am

View your xmls with firefox. It will show errors. Otherwise, it should function properly.

The error below is caused by you adding keep="true" in both the style and the plugin causing the duplicate attribute.

XML Parsing Error: duplicate attribute
Location: http://www.marcolanciani.com/test-villaflora/global.xml
Line Number 402, Column 145: <plugin name="controlbar" url="skin/controlbar.png" keep="true" zorder="1" align="bottom" x="" y="15" crop="0|30|30|30" width="100%" height="" keep="true" />

Regarding the simulator, it is working properly. That is the exact error I get on my iPhone. You have problems in global.xml and perhaps further on too.

Again, use Firefox to locate these errors. It is quite good at pointing out the errors.

mindlessboss

Professional

Posts: 1,082

Location: Russia, Kaliningrad

  • Send private message

7

Monday, November 28th 2011, 6:17am

;-) As i say

Quoted

It can be double attribute in some node
for example
plugin name="pl1" url="someurl" alpha="0.5" keep="true" alpha="0.5"
this makes error (alpha twice)
Check your xml carefully.
If so, in flash works fine but in HTML5 get error.

Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

8

Monday, November 28th 2011, 4:28pm

Found the error left and corrected... should work now and I can see it in the simulator.
Please, could you check?

http://www.marcolanciani.com/test-villaflora/

But still having problems on the sim:
- Can't open the map ("i" button)
- Hide/Show Interface doesn't work.
- Showtext doesn't work. Is this a limitation of ipad/iphone devices?
(if so, it makes no sense changing language. In this case, do I need a second XML without the plugin "flag" and all the showtext attributes or there's a better/cleaner way on the main XML?)

Regards,
Marco

mindlessboss

Professional

Posts: 1,082

Location: Russia, Kaliningrad

  • Send private message

9

Tuesday, November 29th 2011, 1:13am

Hi!Yes you right, showtext wroks only in flash take a look here http://krpano.com/iphone/#supportedfunctionality

Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

Similar threads