コード例 #1
0
ファイル: Geolocation.php プロジェクト: menatwork/geolocation
 /**
  *
  * @param type $arrReturn
  * @return array 
  */
 protected function ajaxSetError($arrReturn)
 {
     switch ($this->Input->post("errID")) {
         case 1:
             $strError = "Premission denined";
             break;
         case 2:
             $strError = "Position unavailable";
             break;
         case 3:
             $strError = "Timeout";
             break;
         case 10:
             $strError = "Not supported Browser.";
             break;
         default:
             $strError = "Unknown error";
             break;
     }
     $this->objUserGeolocation->setFailed(true);
     // Set information for geolocation
     $this->objUserGeolocation->setError($strError);
     $this->objUserGeolocation->setErrorID($this->Input->post("errID"));
     return $arrReturn;
 }