當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Okapi::bearing_as_two_letters方法代碼示例

本文整理匯總了PHP中okapi\Okapi::bearing_as_two_letters方法的典型用法代碼示例。如果您正苦於以下問題:PHP Okapi::bearing_as_two_letters方法的具體用法?PHP Okapi::bearing_as_two_letters怎麽用?PHP Okapi::bearing_as_two_letters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在okapi\Okapi的用法示例。


在下文中一共展示了Okapi::bearing_as_two_letters方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: call


//.........這裏部分代碼省略.........
                 case 'name':
                     $entry['name'] = $row['name'];
                     break;
                 case 'names':
                     $entry['names'] = array(Settings::get('SITELANG') => $row['name']);
                     break;
                     // for the future
                 // for the future
                 case 'location':
                     $entry['location'] = round($row['latitude'], 6) . "|" . round($row['longitude'], 6);
                     break;
                 case 'type':
                     $entry['type'] = Okapi::cache_type_id2name($row['type']);
                     break;
                 case 'status':
                     $entry['status'] = Okapi::cache_status_id2name($row['status']);
                     break;
                 case 'url':
                     $entry['url'] = Settings::get('SITE_URL') . "viewcache.php?wp=" . $row['wp_oc'];
                     break;
                 case 'owner':
                     $owner_ids[$row['wp_oc']] = $row['user_id'];
                     /* continued later */
                     break;
                 case 'distance':
                     $entry['distance'] = (int) Okapi::get_distance($center_lat, $center_lon, $row['latitude'], $row['longitude']);
                     break;
                 case 'bearing':
                     $tmp = Okapi::get_bearing($center_lat, $center_lon, $row['latitude'], $row['longitude']);
                     $entry['bearing'] = $tmp !== null ? (int) (10 * $tmp) / 10.0 : null;
                     break;
                 case 'bearing2':
                     $tmp = Okapi::get_bearing($center_lat, $center_lon, $row['latitude'], $row['longitude']);
                     $entry['bearing2'] = Okapi::bearing_as_two_letters($tmp);
                     break;
                 case 'bearing3':
                     $tmp = Okapi::get_bearing($center_lat, $center_lon, $row['latitude'], $row['longitude']);
                     $entry['bearing3'] = Okapi::bearing_as_three_letters($tmp);
                     break;
                 case 'is_found':
                     /* handled separately */
                     break;
                 case 'is_not_found':
                     /* handled separately */
                     break;
                 case 'is_watched':
                     /* handled separately */
                     break;
                 case 'is_ignored':
                     /* handled separately */
                     break;
                 case 'founds':
                     $entry['founds'] = $row['founds'] + 0;
                     break;
                 case 'notfounds':
                     if ($row['type'] != 6) {
                         # non-event
                         $entry['notfounds'] = $row['notfounds'] + 0;
                     } else {
                         # event
                         $entry['notfounds'] = 0;
                     }
                     break;
                 case 'willattends':
                     if ($row['type'] == 6) {
                         # event
開發者ID:Slini11,項目名稱:okapi,代碼行數:67,代碼來源:geocaches.php


注:本文中的okapi\Okapi::bearing_as_two_letters方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。