XML data formats
All data describing content or preferences for modules stored in XML files of simple format:
<dataType> <parameterName1>value1</parameterName1> <parameterName2>value2</parameterName2> ... </dataType>
List of possible data types and parameters is fixed.
In every data type you can omit either of parameters if you don't need it, default value or default behavior with undefined value will be applied (see parameters description). There are several exceptions — essential parameters of content describing data, which must exist and can not be omitted; they are marked specially.
Common preferences
<prefsCommon> — common preferences data
Example:
<prefsCommon> <scriptAuthorization>scripts/authorization.php</scriptAuthorization> <scriptSaver>scripts/saver.php</scriptSaver> <editorsInterface>delegate</editorsInterface> <allowJavaScript>true</allowJavaScript> </prefsCommon>
- <scriptAuthorization>
Path to script verifying login and password for entering editing mode.
If value is not set—authorization and hence online editing will be impossible.
Example:
scripts/authorization.php
- <scriptSaver>
Path to script receiving string data from module in editing mode and saving it in data file.
If value is not set—saving changes during editing will be impossible.
Example:
scripts/saver.php
- <allowJavaScript>
Communication of module with JavaScript. Can be one of two values:
trueorfalse.If value is not set —
falsesupposed.
- <editorsInterface>
Defines interface behavior in editing mode. Can be one of two string values:
delegateorprovide.If
delegate— all editor's dialogs for this module will appear in other module, which has this parameterprovide. It useful for small-sized modules which not able to contain dialogs.If
provide— module will show editor's dialog of other modules, which has this parameterdelegate, and also it's own dialogs.If value is not set — module will show only it's own dialogs.
It is evident that there must be one "provider" in group, if "delegator" exists.
Every parameter of common preferences can be set in local preferences in addition to specific parameters. In this case such parameters from common preferences will be overridden.
For example, you can set <editorsInterface> to delegate in common preferences (i.e. for all modules in group) and set it to provide for only one of them in it's local preferences.
Specific preferences
<prefsPano> — preferences specific to panoramic module
Example:
<prefsPano> <maxScrollStep>50</maxScrollStep> <controlMode>relative</controlMode> <enableAutoRotation>true</enableAutoRotation> <initialLoadData>somePano.xml</initialLoadData> </prefsPano>
- <maxScrollStep>
Maximum step of scrolling (in pixels).
Scrolling speed is "one step per frame". Step value can be from 0 to <maxScrollStep>, in this range it is controlled by user via mouse.
If value is not set — 30 supposed.
- <controlMode>
Defines how user can scroll panorama via mouse. May be one of two string values:
relativeorabsolute.If
relative— scrolling direction and step are defined by direction and distance of mouse dragging from click point within module.If
absolute— scrolling direction and step are defined by direction and distance between module's center and mouse pressed.If value is not set —
absolutesupposed.
- <enableAutoRotation>
Random panorama rotation (i.e. scrolling) start after any time of no user activity. Can be one of two values:
trueorfalse.If value is not set —
falsesupposed.
- <initialLoadData>
Path (relative to <filesLocation>) to data file that will be loaded on startup.
If value is not set — module will remain empty until command to load data is received.
Example:
somePano.xml
<prefsMap> — preferences specific to map module
Example:
<prefsMap> <maxScrollStep>10</maxScrollStep> <controlMode>relative</controlMode> <showFieldOfVision>true</showFieldOfVision> <initialLoadData>someMap.xml</initialLoadData> </prefsMap>
- <maxScrollStep>
Same as <prefsPano> (if scrolling is enabled, i.e. map size is larger then module size).
- <controlMode>
Same as <prefsPano> (if scrolling is enabled, i.e. map size is larger then module size).
- <showFieldOfVision>
Showing of dynamic field of vision depending on loaded panorama's parameters and position. Can be one of two values:
trueorfalse.If value is not set —
falsesupposed.
- <initialLoadData>
Path (relative to <filesLocation>) to data file that will be loaded on startup.
If value is not set — module will remain empty until command to load data is received.
Example:
somePano.xml
<prefsThumbnails> — preferences specific to map module
Example:
<prefsThumbnails> <backColor>#FFFFFF</backColor> <backSelectedColor>#FFDD99</backSelectedColor> <borderColor>#FFFFFF</borderColor> <borderSelectedColor>#FFAA66</borderSelectedColor> <backAlpha>40</backAlpha> <borderAlpha>60</borderAlpha> <borderThickness>1</borderThickness> <captionHeight>20</captionHeight> <initialLoadData>thumbnails.xml</initialLoadData> </prefsThumbnails>
- <backColor>
- Color values in hex format (CSS-like). Example:
#00C6F0.
- <backSelectedColor>
- <borderColor>
- <borderSelectedColor>
- <backAlpha>
- Opacity percent (from 0 to 100). Example:
70.
- <borderAlpha>
- <borderThickness>
- In pixels.
- <captionHeight>
- <initialLoadData>
Path (relative to <filesLocation>) to data file that will be loaded on startup.
If value is not set — module will remains empty until command to load data will be received.
Example:
somePano.xml
Data describing content
<panData> — data describing content for panoramic module
Example:
<panData> <namesFixedBeforeVar>somePano_</namesFixedBeforeVar> <namesVariable>1,2,3,4,5,6</namesVariable> <namesFixedAfterVar>.jpg</namesFixedAfterVar> <angle>230</angle> <land>55.3</land> <north>37.64</north> <scY>74</scY> <scX>160</scX> <caption>Cool place!</caption> <hotspotsDataSource>somePano_hotspots.xml</hotspotsDataSource> </panData>
Module creates list of panorama's fragments to load from these parameters.
In example given above it will be:
somePano_1.jpg, somePano_2.jpg, somePano_3.jpg, somePano_4.jpg, somePano_5.jpg, somePano_6.jpg.
Iif you want, you can omit <namesFixedBeforeVar> and <namesFixedAfterVar> and write the whole list in <namesVariable>.
Learn more about preparing panoramas...
- <namesFixedBeforeVar>
Fixed part at beginning of all filenames of panorama's fragments.
- <namesVariable>
Variable parts of filenames of panorama's fragments (separated by comma without spaces).
It is essential parameter and it must be set.
- <namesFixedAfterVar>
Fixed part at end of all filenames of panorama's fragments.
- <angle>
-
Full angle of vision for this panorama (from 0 to 360 degrees).
If value is not set — it will be impossible to show field of vision on map for this panorama.
- <land>
-
Percent (from 0 to 100) of land height relative to full height of panoramic photo. Land height is measured from low edge of photo to horizon.
This parameter is for correct panoramic distortion.
If value is not set — 50 supposed, i.e. horizon is in the middle.
- <north>
-
North direction for panorama. It is distance from left edge of panoramic photo to north point — in percent relative to it's full width, so it may be from 0 to 100.
This parameter is for correct field of vision on map for this panorama. Also, if it is set, it is a reference point for hotspots positioning.
If value is not set — 0 supposed, i.e. north is at left edge of panorama.
- <adjustHorizontals>
-
Is compensatory "reversed pincushion distortion" necessary or not. May be
trueorfalse.If value is not set —
truesupposed.
- <adjustVerticals>
-
Is compensatory "barrel distortion" necessary or not. May be
trueorfalse.If value is not set —
truesupposed.
- <hotspotsDataSource>
-
Path to data file describing hotspots on this panorama.
If value is not set — 0 supposed.
- <caption>
-
String that may be written on page as caption of module, if <allowJavaScript> is set to
truein preferences.
<mapData> — data describing content for panoramic module
Example:
<mapData> <imageFile>map_Townsville.png</imageFile> <caption>Townsville map</caption> <hotspotsDataSource>map_Townsville_hotspots.xml</hotspotsDataSource> </mapData>
- <imageFile>
Location of image file that will be loaded as map.
It is essential parameter and it must be set.
- <hotspotsDataSource>
Path to data file describing hotspots on this panorama.
If value is not set — 0 supposed.
- <caption>
String that may be written on page as caption of the module, if <allowJavaScript> is set to
truein preferences.
<thumbnails> — data describing content for thumbnails module
Example:
<thumbnails>
<elem0>
<viewSource>thumbnails/thumbnailPicture0.png</viewSource>
<loadDataSource>somePano.xml</loadDataSource>
<moduleLoaderType>panorama</moduleLoaderType>
<hintText>This Is Hint</hintText>
<caption>This Is Caption</caption>
</elem0>
<elem1>
<viewSource>thumbnails/thumbnailPicture1.png</viewSource>
<loadDataSource>somePano2.xml</loadDataSource>
<moduleLoaderType>panorama</moduleLoaderType>
<hintText>This Is Another Hint</hintText>
<caption>This Is Caption Too</caption>
</elem1>
<elem2>
...
</elem2>
...
</thumbnails>
It include blocks of data in tags <elem0>...</elem0>, <elem1>...</elem1> and so on (numbering from 0). Every block describes one thumbnail.
- <viewSource>
Path to image file of thumbnail.
- <loadDataSource>
Path to data file describing content for module of any type. This data will be loaded by click.
- <moduleLoaderType>
Sets type of modules in group which will load data from <loadDataSource> by click. May be one of three values:
panorama,map,thumbnails.For example, if this parameter is set to
panoramafor any thumbnail, then click on it will start loading data file <loadDataSource> into panoramic module in group, if such exists.If value is not set, but <loadDataSource> defined — thumbnails module containing this thumbnail will try to load this data.
- <hintText>
Hint text that appears on mouse over.
- <caption>
Text of label (caption) below thumbnail.
- <id>
Unique identifier, any string what you want.
It used when any JavaScript function must be called on click, then <id> will be passed as argument.
- <jsFunction>
The name of JavaScript function which will be called on click. It will receive <id> as argument.
<hotspots> — data describing hotspots on panorama or map
Example:
<hotspots>
<elem0>
<viewSource>hotspot1.png</viewSource>
<loadDataSource>panoChamber.xml</loadDataSource>
<moduleLoaderType>panorama</moduleLoaderType>
<hintText>Click to enter panoramic|scene of chamber</hintText>
<azimuth>140</azimuth>
</elem0>
<elem1>
<viewSource>anotherHotspot.swf</viewSource>
<loadDataSource>somePano2.xml</loadDataSource>
<moduleLoaderType>panorama</moduleLoaderType>
<hintText>This Is Another Hint</hintText>
</elem1>
<elem2>
...
</elem2>
...
</hotspots>
It include blocks of data in tags <elem0>...</elem0>, <elem1>...</elem1> and so on (numbering from 0). Every block describes one hotspot.
- <viewSource>
Path to image or swf file of hotspot.
- <loadDataSource>
Path to data file describing content for module of any type. This data will be loaded on click.
- <moduleLoaderType>
What type of modules in group will on click load data from <loadDataSource>. May be one of three values:
panorama,map,thumbnails.For example, if this parameter is set to
panoramafor any hotspot, then click on it will start loading data file <loadDataSource> into another panoramic module in group, if such exist (but not into module containing this hotspot, even if it is panoramic).If value is not set, but <loadDataSource> defined —module containing this hotspot will try to load this data.
- <hintText>
Hint text that appears on mouse over.
- <azimuth>
Horizontal angle (in degrees) from panorama's north direction to hotspot.
It used if <angle> and <north> are defined for panorama.
- <yPercent>
Distance from low edge of image (panorama or map) to hotspot — in percent of full image height.
- <xPercent>
Distance from left edge of image (panorama or map) to hotspot — in percent of full image width.
It used only if <azimuth> can not be used, for example, it always used for hotspots on map.
- <id>
Unique identifier, any string what you want.
It used when any JavaScript function must be called on click, then <id> will be passed as argument.
- <distorted>
Is compensatory distortion take effect on hotspot or not. May be one of two values:
trueorfalse.If hotspot must always coincide with panoramic environment — set value of
true.If hotspot's original shape must be kept — set value of
false.If value is not set —
falsesupposed.
- <effectType>
Kind of build-in effect on mouse over. May be one of two values:
alphaorglow.If
alpha— hotspot will be fully transparent (invisible) until mouse will be put over it. Ifglow— on mouse over outer glow will appear.If value is not set — no build-in effect will be used.
- <effectColor>
CSS-like color value, for example
#FFCC00. It is color for glow effect and for field of vision on map.
- <url>
External URL that will be loaded on click.
- <window>
Specifies the window or HTML frame where the document should load. You can enter either the name of a specific window or one of the following reserved target names:
_selfspecifies the current frame in the current window.
_blankspecifies a new window.
_parentspecifies the parent of the current frame.
_topspecifies the top-level frame in the current window.
- <jsFunction>
The name of JavaScript function which will be called on click. It will receive <id> as argument.
