This commit is contained in:
gemo1011
2018-05-18 15:34:50 +02:00
parent 10897787af
commit 6b8c99a275
2 changed files with 37 additions and 26 deletions

View File

@@ -41,7 +41,7 @@ if ($sOsmType && $iOsmId > 0) {
if ($oLookup) {
$aPlaces = $oPlaceLookup->lookup(array($oLookup->iId => $oLookup));
if (!empty($aPlaces)) {
if (sizeof($aPlaces)) {
$aPlace = reset($aPlaces);
}
}
@@ -55,14 +55,16 @@ if (isset($aPlace)) {
$aPlace['place_id'],
$aPlace['lon'],
$aPlace['lat'],
$fRadius
$fRadius,
$fLat,
$fLon
);
if ($aOutlineResult) {
$aPlace = array_merge($aPlace, $aOutlineResult);
}
} else {
$aPlace = array();
$aPlace = [];
}
@@ -72,10 +74,8 @@ if (CONST_Debug) {
}
if ($sOutputFormat == 'html') {
$sDataDate = chksql($oDB->getOne("select TO_CHAR(lastimportdate,'YYYY/MM/DD HH24:MI')||' GMT' from import_status limit 1"));
$sDataDate = chksql($oDB->getOne("select TO_CHAR(lastimportdate - '2 minutes'::interval,'YYYY/MM/DD HH24:MI')||' GMT' from import_status limit 1"));
$sTileURL = CONST_Map_Tile_URL;
$sTileAttribution = CONST_Map_Tile_Attribution;
}
$sOutputTemplate = ($sOutputFormat=='jsonv2' ? 'json' : $sOutputFormat);
include(CONST_BasePath.'/lib/template/address-'.$sOutputTemplate.'.php');
include(CONST_BasePath.'/lib/template/address-'.$sOutputFormat.'.php');