From 2ab43f6367518f0e63a770fcae202e016c3f09aa Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 14 Jun 2016 21:38:03 +0200 Subject: [PATCH] reverse do not downgrade tiger and interpolation results Also fix the type that is returned for Tiger data. Fixes #470 --- lib/ReverseGeocode.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ReverseGeocode.php b/lib/ReverseGeocode.php index 4eeb5cc4..d2902a59 100644 --- a/lib/ReverseGeocode.php +++ b/lib/ReverseGeocode.php @@ -203,6 +203,7 @@ $iPlaceID = $aPlaceLine['place_id']; $iParentPlaceID = $aPlaceLine['parent_place_id']; // the street $fFraction = $aPlaceLine['fraction']; + $iMaxRank = 30; } // else: nothing to do, take placex house from above } @@ -213,6 +214,7 @@ $iPlaceID = $aPlaceLine['place_id']; $iParentPlaceID = $aPlaceLine['parent_place_id']; // the street $fFraction = $aPlaceLine['fraction']; + $iMaxRank = 30; } } } @@ -249,6 +251,7 @@ $iPlaceID = $aPlaceTiger['place_id']; $iParentPlaceID = $aPlaceTiger['parent_place_id']; // the street $fFraction = $aPlaceTiger['fraction']; + $iMaxRank = 30; } } @@ -272,7 +275,7 @@ } } return array('place_id' => $iPlaceID, - 'type' => $bPlaceIsTiger ? 'tiger' : $bPlaceIsLine ? 'interpolation' : 'osm', + 'type' => $bPlaceIsTiger ? 'tiger' : ($bPlaceIsLine ? 'interpolation' : 'osm'), 'fraction' => ($bPlaceIsTiger || $bPlaceIsLine) ? $fFraction : -1); } -- 2.39.5