The Javascript viewer is an additional file - the
krpanoiphone.js.
It must be placed in the same folder as the
krpano.swf and will be loaded automatically
on the iPhone / iPad / iPod Touch devices by
swfkrpano.js
embedding script (other embedding scripts will follow).
This viewer is an
Add-on to the normal krpano licenses, so there is an additional
license necessary -
get it here - it's a personalized license file -
the
krpanoiphone.license.js, it must be placed in the same folder as the
krpanoiphone.js.
The embedding syntax is the same like for the krpano Flash Panorama viewer, no changes
are necessary here, but note - it's important to set some iPhone specific meta settings in HTML
for correctly scaling - just use the default HTML template, which is included in the viewer and tools download packages!
Only
cubical panoramic images are supported at the moment!
And their size is limited (the exact size is unknown), for the iPhone cube face sizes like 480x480 to 640x640 seems to be good,
and for the iPad something around 1024x1024 to 1280x1280.
Just play around and find what size is good in your eyes.
BUT NOTE - too large images will crash the Mobile Safari Browser!
The paths to the iPhone / iPad images will be set in the
XML in the
<image> node
by the
<mobile> and
<tablet> tags.
If it will be possible to support in future also other mobile devices (e.g Android based ones) then these tags and images
can / will be used also for them.
On the iPhone the
<mobile> tag will be loaded and on the iPad the
<tablet> tag or if that doesn't
exists then the
<mobile> tag.
Here an example of the XML structure:
<image ...>
<!-- here the normal pano image paths -->
...
<!-- mobile phone / iphone images -->
<mobile>
<left url="mobile_l.jpg" />
<front url="mobile_f.jpg" />
<right url="mobile_r.jpg" />
<back url="mobile_b.jpg" />
<up url="mobile_u.jpg" />
<down url="mobile_d.jpg" />
</mobile>
<!-- tablet pc / ipad images -->
<tablet>
<left url="tablet_l.jpg" />
<front url="tablet_f.jpg" />
<right url="tablet_r.jpg" />
<back url="tablet_b.jpg" />
<up url="tablet_u.jpg" />
<down url="tablet_d.jpg" />
</tablet>
</image>