topical media & game development

talk show tell print

mobile-wikitude-POI.php / php



  <?php
  
          
Class to represents a Wikitude-ARML-Placemark
author: Thomas Krammer - www.powerhour.at
version: 1.1

  
  	class PowerHour_Wikitude_POI implements PowerHour_Wikitude_IPOI
          {
  
                  protected id = 0;
                  protected provider = "";
                  protected name = "";
                  protected description = "";
                  protected thumbnail = "";
                  protected phone = "";
                  protected url = "";
                  protected email = "";
                  protected address = "";
                  protected attachments = array();
                  protected longitude = 0.0;
                  protected latitude = 0.0;
                  protected altitude = 0;
  
                  public function __construct(provider, name)
                  {
                          this->provider = provider;
                          this->name = name;
                  }
  
                  public function getId()
                  {
                          return this->id;
                  }
  
                  

parameter: mixed id Identifies a point of interest. Is used to update POIs when uploaded via Wikitude.me

  
                  public function setId(id)
                  {
                          this->id = id;
                  }
  
                  

returns: the provider

  
                  public function getProvider() {
                          return this->provider;
                  }
  
                  

parameter: provider Reference to the content provider definition.

  
                  public function setProvider(provider) {
                          this->provider = provider;
                  }
  
                  

returns: the name

  
                  public function getName() {
                          return this->name;
                  }
  
                  

returns: the description

  
                  public function getDescription() {
                          return this->description;
                  }
  
                          

returns: the thumbnail

  
                  public function getThumbnail() {
                          return this->thumbnail;
                  }
  
                          

returns: the phone

  
                  public function getPhone() {
                          return this->phone;
                  }
  
                          

returns: the url

  
                  public function getUrl() {
                          return this->url;
                  }
  
                          

returns: the email

  
                  public function getEmail() {
                          return this->email;
                  }
  
                          

returns: the address

  
                  public function getAddress() {
                          return this->address;
                  }
  
                          

returns: the attachments

  
                  public function getAttachments() {
                          return this->attachments;
                  }
  
                          

returns: the longitude

  
                  public function getLongitude() {
                          return this->longitude;
                  }
  
                          

returns: the latitude

  
                  public function getLatitude() {
                          return this->latitude;
                  }
  
                          

returns: the altitude

  
                  public function getAltitude() {
                          return this->altitude;
                  }
  
                  

parameter: name Name of the POI. Displayed as POI title.

  
                  public function setName(name) {
                          this->name = name;
                  }
  
                  

parameter: description Description of the POI. Currently no HTML formatting is allowed.

  
                  public function setDescription(description) {
                          this->description = description;
                  }
  
                  

parameter: thumbnail Additional information about a POI that is displayed in the bubble.

  
                  public function setThumbnail(thumbnail) {
                          this->thumbnail = thumbnail;
                  }
  
                  

parameter: phone When a phone number is given, Wikitude displays a "call me" button in the bubble. You can directly call the person/organization behind the POI. E.g. call a restaurant to reserve a table for dinner.

  
                  public function setPhone(phone) {
                          this->phone = phone;
                  }
  
                  

parameter: url Link to a web page that contains additional information about the POI.

  
                  public function setUrl(url) {
                          this->url = url;
                  }
  
                  

parameter: email Write the person/organization an email directly from Wikitude.

  
                  public function setEmail(email) {
                          this->email = email;
                  }
  
                  

parameter: address Address of the POI. Also used to route to the location of the POI.

  
                  public function setAddress(address) {
                          this->address = address;
                  }
  
                  

parameter: PowerHour_Wikitude_Attachment attachment

  
                  public function addAttachment(PowerHour_Wikitude_Attachment attachment) {
                          this->attachments[] = attachment;
                  }
  
                  

parameter: longitude the longitude to set

  
                  public function setLongitude(longitude) {
                          this->longitude = longitude;
                  }
  
                          

parameter: latitude the latitude to set

  
                  public function setLatitude(latitude) {
                          this->latitude = latitude;
                  }
  
                          

parameter: altitude the altitude to set

  
                  public function setAltitude(altitude) {
                          this->altitude = altitude;
                  }
  
                  

returns: string The coordinates are entered in the format longitude, latitude, altitude. Altitude is optional. Altitude must be given in meters.

  
                  public function getCoordinates()
                  {
                          return this->longitude.",".this->latitude.",".this->altitude;
                  }
  
          }


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.