本文整理汇总了PHP中Location::setLatitude方法的典型用法代码示例。如果您正苦于以下问题:PHP Location::setLatitude方法的具体用法?PHP Location::setLatitude怎么用?PHP Location::setLatitude使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Location
的用法示例。
在下文中一共展示了Location::setLatitude方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: convertToLocationObject
public static function convertToLocationObject($result)
{
$ret = new Location();
$ret->setRoad(static::getElement($result['address'], 'road'));
$ret->setHouseNumber(static::getElement($result['address'], 'house_number'));
$ret->setSubUrb(static::getElement($result['address'], 'suburb'));
$ret->setCity(static::getElement($result['address'], 'city'));
$ret->setPostCode(static::getElement($result['address'], 'postcode'));
$ret->setStateDistrict(static::getElement($result['address'], 'state_district'));
$ret->setState(static::getElement($result['address'], 'state'));
$ret->setCountry(static::getElement($result['address'], 'country'));
$ret->setCountryCode(static::getElement($result['address'], 'country_code'));
$ret->setLatitude($result['lat']);
$ret->setLongitude($result['lon']);
return $ret;
}
示例2: LocationQuery
$location->setAddressTwo($_POST["address"]);
$_POST["address"] = $location->getAddressTwo();
$location->setLastChangeUserid($_SESSION["userid"]);
$location->setCity($_POST["city"]);
$_POST["city"] = $location->getCity();
$location->setState($_POST["state"]);
$_POST["state"] = $location->getState();
$location->setStaffid($_POST["staffid"]);
$_POST["staffid"] = $location->getStaffid();
$location->setPincode($_POST["pincode"]);
$_POST["pincode"] = $location->getPincode();
$location->setDays($_POST["days"]);
$_POST["days"] = $location->getDays();
$location->setTime($_POST["time"]);
$_POST["time"] = $location->getTime();
$location->setLatitude($_POST["latitude"]);
$_POST["latitude"] = $location->getLatitude();
$location->setLongitude($_POST["longitude"]);
$_POST["longitude"] = $location->getLongitude();
$locQ = new LocationQuery();
$locQ->connect();
#**************************************************************************
#* Insert new library member
#**************************************************************************
$locationid = $locQ->insert($location);
$locQ->close();
#**************************************************************************
#* Destroy form values and errors
#**************************************************************************
unset($_SESSION["postVars"]);
unset($_SESSION["pageErrors"]);
示例3: parseLocation
public function parseLocation($locationObject)
{
$location = new Location();
$location->setLongitude($locationObject->longitude);
$location->setLatitude($locationObject->latitude);
return $location;
}
示例4: Location
function _mkObj($array)
{
$location = new Location();
$location->setLocationid($array["locationid"]);
$location->setAddressOne($array["loc_address_one"]);
$location->setAddressTwo($array["loc_address_two"]);
$location->setLastChangeDt($array["last_change_dt"]);
$location->setStaffid($array["staffid"]);
$location->setLastChangeUserid($array["last_change_userid"]);
if (isset($array["username"])) {
$location->setLastChangeUsername($array["username"]);
}
$location->setPincode($array["loc_pincode"]);
$location->setCity($array["loc_city"]);
$location->setState($array["loc_state"]);
$location->setDays($array["loc_days"]);
$location->setTime($array["loc_time"]);
$location->setLatitude($array["loc_latitude"]);
$location->setLongitude($array["loc_longitude"]);
return $location;
}
示例5:
if (isset($_GET['OnSite'])) {
$Plant->setPlantEnteredOnSite($_GET['OnSite']);
} else {
$php_errormsg = $php_errormsg . "Missing On Site.<br> ";
}
if (isset($_GET['PlantNotes'])) {
$Plant->setPlantNote($_GET['PlantNotes']);
}
$LocationCount = 0;
if (isset($_GET['Longitude'])) {
$LocationCount++;
$Location->setLongitude($_GET['Longitude']);
}
if (isset($_GET['Latitude'])) {
$LocationCount++;
$Location->setLatitude($_GET['Latitude']);
}
if (isset($_GET['GPS'])) {
$LocationCount++;
$Location->setGPS($_GET['GPS']);
}
$locationError = false;
if (!$Location->getGPS() && !$Location->getLatitude() && !$Location->getLongitude()) {
$LocationError = true;
}
if (isset($_GET['Note'])) {
$LocationCount++;
$Location->setLocationNote($_GET['Note']);
$LocationError = false;
}
if ($LocationError) {