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. When using the krpano tools droplets a single Javascript file with all files
embedded (the Flash embedding script, the krpanoJS Viewer and the licneses) will be created by default.
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 on iPhone and iPad, so the max. cube size is 1024x1024 on these devices.
There are two ways to add images for the iPhone and iPad:
- Either use multiresolutions panos and make sure that there are levels that are small enough.
For the iPhone 3G / iPod touch levels smaller than 512 pixels and for the iPad / iPhone 4 levels that are smaller than 1100 pixels.
- Specify dedicated images via the <mobile> and <tablet> tags:
The paths to the iPhone / iPad images will be set in the XML in the <image> node
by the <mobile> and <tablet> tags.
On the iPhone 3G/3GS or iPod Touch 3 the <mobile> tag will be loaded and on the iPad and the iPhone 4
the <tablet> tag or if that doesn't exists also then the <mobile> tag.
Here an example of the XML structure:
<image ...>
<!-- here the normal pano image paths -->
...
<!-- mobile phone / iphone images -->
<mobile>
<cube url="mobile_%s.jpg" />
</mobile>
<!-- tablet pc / ipad images -->
<tablet>
<cube url="tablet_%s.jpg" />
</tablet>
</image>