SightwalkView
Reference object of the sightwalk Widget
function SightwalkView (containerId, apiKey, width, height, posObj...)
Creates the sightwalk widget and embeds it into the HTML DOM model at the desired spot
Parameter:
| containerId |
String |
Name of the HTML element used as container for the Flash content |
| apiKey |
String |
API Key (available free of charge as registered user via www.sightwalk.de) |
| width |
String |
Width of the widget (applied as style size definition, therefore relative definitions may be used as well) |
| height |
String |
Height of the widget (applied as style size definition, therefore relative definitions may be used as well) |
| posObj |
Object |
May be one or more of the following types: GeoPos, panoId, Address, Orientation
|
Returns: void
function loadPano (geoPos, orientation)
Loads the panorama which is closest to the given position
Parameter:
| geoPos |
GeoPos |
Target coordinate |
| orientation |
Orientation |
Initial view |
Returns: Integer (see constants)
function loadPano (address, orientation)
Loads the panorama which is closest to the given address
Parameter:
| address |
Address |
Target address |
| orientation |
Orientation |
Initial view |
Returns: Integer (see constants)
function showMessage (message)
Shows a message
Parameter:
| message |
String |
Message contents |
Returns: Integer (see constants)
function getPano ()
Returns the currently shown pano
Parameter: void
Returns: Pano
function getOrientation ()
Returns the current view orientation
Parameter: void
Returns: Orientation
function setOrientation (orientation)
Sets the current view orientation
Parameter:
| orientation |
Orientation |
View |
Returns: Integer (see constants)
function getLink ()
Returns the deeplink URL for the current pano with the actual view orientation. Opening the URL leads to an appropriate view at www.sightwalk.de
Parameter: void
Returns: String
function rotateTo (orientation, seconds)
Rotates the view angle to the target view with the given speed
Parameter:
| orientation |
Orientation |
View |
| seconds |
Integer |
Time/Speed |
Returns: Integer (see constants)
function rotateBy (deltaOrientation)
Rotates the view angle by the given amount
Parameter:
| deltaOrientation |
Orientation |
View angle |
Returns: Integer (see constants)
function getApiVersion ()
Returns the current API version.
Parameter: void
Returns: Number
function setActive (active)
Sets the widget to active resp. inactive state. In inactive state, almost all widget functions are deactivated to reduce CPU consumption.
Parameter:
| active |
Boolean |
Target state |
Returns: Integer (see constants)
function getTags ()
Returns an array of the current pano's tags
Parameter: void
Returns: Tag[]
function showTag (tagId)
Show the given tag's dialog
Parameter:
Returns: Integer (see constants)
function addTag (tag, makePersistent)
Create a new tag
Parameter:
| tag |
Tag |
The tag to create |
| makePersistent |
Boolean |
If TRUE, the tag will be stored in the database (initially only visible for users of the current API key, after validation by panogate for everyone) |
Returns: Integer (see constants)
function addEventListener (eventType, handlerFunction)
Register an event handler
Parameter:
| eventType |
Konstante |
The event type (see constants) |
| handlerFunction |
Function |
Callback function |
Returns: Integer (see constants)
function removeEventHandler (eventType, handlerFunction)
Unregister an event handler
Parameter:
| eventType |
Konstante |
The event type (see constants) |
| handlerFunction |
Function |
Callback function |
Returns: Integer (see constants)
function gotoNextTag (type)
Jump to the closest pano containing a tag of the given type
Parameter:
| type |
Konstante |
The tag type (see constants) |
Returns: Integer (see constants)
function search (city, query)
Returns results for the search query
Parameter:
| city |
String |
City name |
| query |
String |
Search query |
Returns: Integer (see constants)
Return values
SUCCESS
Value: 0
The action was completed successfully.
ERROR_NOT_INITIALIZED
Value: -1
The widget is not initialized yet.
ERROR_INVALID_ARGS
Value: -2
At least one parameter does not conform with format definitions.
ERROR_EXEC
Value: -3
Error while executing the command.
ERROR_INVALID_APIKEY
Value: -4
No valid API key was definied.
ERROR_SECURITY
Value: -5
Security error (i.e. a specified parameter contains non-valid terms)
Tag types
TAG_BILDUNG
Education
Value: 1
TAG_DIENSTLEISTUNGEN
Services
Value: 2
TAG_FREIZEIT
Leisure, sports
Value: 3
TAG_GASTRONOMIE
Food, restaurants
Value: 4
TAG_FINANCIAL
Financial
Value: 6
TAG_HOTEL
Hotels
Value: 7
TAG_IMMOBILIEN
Real estate, flats for rent
Value: 8
TAG_GESUNDHEIT
Health
Value: 9
TAG_MOBILITAET
Public transport, cabs
Value: 10
TAG_THEATER
Theater
Value: 11
TAG_SHOPPING
Shopping
Value: 12
TAG_NEWS
News
Value: 13
TAG_USER
User-defined tags
Value: 15
TAG_HISTORY
Historical info/pictures
Value: 16
TAG_WIKIPEDIA
Wikipedia
Value: 17
TAG_LAW
Legal institution
Value: 25
TAG_POST
Postal service
Value: 26
TAG_POLIZEI
Police, emergency service
Value: 27
TAG_PARKING
Parking
Value: 28
TAG_CONTAINER
Recycling container
Value: 29
TAG_BARCLUB
Bar, club
Value: 30
TAG_MUSEUM
Museum
Value: 31
TAG_KIRCHE
Church, mosque, synagogue
Value: 32
TAG_ATTRACTION
Attraction, tourist spot
Value: 34
TAG_KINO
Cinema
Value: 35