Open main menu

Extension:Vtour

MediaWiki extensions manual
Crystal Clear action run.svg
Vtour
Release status: experimental
Implementation Tag, Special page
Description Lets users create virtual tours with images and spherical panoramas
Author(s) Álvaro Fernández Millara (Qwertyytrewqqwertytalk)
Latest version 0.0.1 (2012-08-08)
MediaWiki 1.17+
PHP ~5.3
License GPL 2
Download Project page
Git [Help]

Browse source code
View code changes

Note Note: No localisation updates provided by translatewiki.net .
Parameters
$wgVtourParseStrict $wgVtourAllowNonStandardDecimalSeparator $wgVtourAllowExternalImages $wgVtourStandardLatLngOrder $wgVtourDefaultTourDimensions $wgVtourExternalMap $wgVtourGoogleExternalMapAPIUrl $wgVtourGoogleExternalMapTimeout
Tags
vtour
Translate the Vtour extension if it is available at translatewiki.net
Check usage and version matrix.

The Vtour extension lets wiki users create virtual tours with interlinked images and spherical panoramas.

Configuration parameters, usage instructions and additional information will be added soon.

Contents

InstallationEdit

  • Download and place the file(s) in a directory called Vtour in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/Vtour/Vtour.php";
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parametersEdit

UsageEdit

The vtour tagEdit

The vtour tag is used to define a virtual tour. It can have the following attributes:

  • id: An alphanumerical word that may be used to reference this tour (optional).
  • start: The name or id of the place where the tour will start (optional).
  • width and height: Width and height of the virtual tour box, in pixels (optional).

The vtour element may contain maps and/or places.

The place tagsEdit

The textplace, imageplace and panoplace tags can be used to define places that contain wikitext, images or spherical panoramas, respectively. They can have the following attributes:

  • name: A string with non-zero length that will be displayed as the title of this place, and that may be used to refer it (mandatory).
  • id: An alphanumerical word that may be used to reference this place (optional).
  • visible: Whether the place will be shown on the map, if it belongs to one. Either true or false (optional, default: true).
  • description: A wikitext description of the place (optional).
  • map: The id or name of the map where this place belongs (optional).
  • location: A pair of coordinates (with a space, colon, semicolon or comma in the middle), relative to the size of the map image in pixels, where the place will appear on the map, if it is visible (optional).
  • angle: The angle, in degrees relative to 12 o'clock and clockwise, at which the place is orientated (optional).
  • up: The id or name of the place that is on top of this one (optional, default: the first place that references this one as down / the map setting / none).
  • down: The id or name of the place that is immediately under this one (optional, default: the first place that references this one as up / the map setting / none).
  • tooltip: Whether a tooltip will be displayed when the mouse is over a link to this place (optional, default: true).
  • center: The coordinates of the point that will be in the center of the view at the start. The meaning of this attribute varies with the place type (optional).
  • zoom: The zoom level of the place. The meaning of this attribute varies with the place type (optional).

A child element can be used for the description instead of an attribute:

<imageplace ...>
    <description>This is the description.</description>
</imageplace>

is equivalent to

<imageplace description="This is the description." .../>

textplaces also contain a text attribute, which is their main content and works just like the description, except that it is mandatory. The zoom attribute is ignored, and the center is a pair of percentages, of the width and the height respectively.

imageplaces must have an image attribute, the name of the file (previously uploaded to the wiki) that will be used. The zoom attribute is a multiplier of the original image size (so 1 is the real size). The center is relative to the real size in pixels (x, y).

panoplaces must have an image attribute, the name of the file (previously uploaded to the wiki) that will be used. Spherical panorama images are expected to be in the equirectangular projection. The zoom attribute is a multiplier of the default 'focal length'. The center is a pair of geographical coordinates (first latitude, then longitude).

imageplaces and panoplaces may contain pointlinks and arealinks.

The link tagsEdit

The pointlink and arealink tags can be used to create links from one place to another. pointlinks are located in a single point, while arealinks are polygons. They can have the following attributes:

  • location: The location of the link in the imageplace or panoplace. pointlinks expect a pair of coordinates while arealinks are defined by at least three pairs (vertices).
  • destination: The id or name of the place where the link goes (mandatory).
  • center, zoom and tooltip: Same as the equivalent parameters for places, but specific to a single link (optional, default: values of the equivalent attributes in the destination place).

The map tagEdit

The map tag describes a single map that may contain places. maps can have the following attributes:

  • name: A string with non-zero length that can be used to reference the map and appears alongside the place name (mandatory).
  • id: An alphanumerical word that can be used to reference the map (optional).
  • image: The name of the file (previously uploaded to the wiki) that will be used (mandatory).
  • start: The name or id of the place that will be selected after arriving to this map from a neighbour (optional, default: first place in the map).
  • up: The id or name of the map that is on top of this one (optional, default: the first map that references this one as down / none).
  • down: The id or name of the map that is immediately under this one (optional, default: the first map that references this one as up / none).
  • location: The coordinates of the map in an external map system (currently only Google Maps is supported). The expected value is two pairs of coordinates: the latitude and longitude of the bottom left corner of the image and the latitude and longitude of the top right corner. If set, the map image will appear over a Google Maps view (optional).

Map elements may contain places. This:

<map id="examplemap"...>
    <imageplace .../>
</map>

is equivalent to

<map id="examplemap".../>
<imageplace map="examplemap".../>