Skip to content

Commit

Permalink
Remove echo statement
Browse files Browse the repository at this point in the history
  • Loading branch information
skthon authored Dec 11, 2017
1 parent 31e473b commit 351280f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Geohash.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public function encode($latitude, $Longitude, $geohashLength = 5) {
// Convert the binary to hash
$hash = "";
for ($i=0; $i< strlen($binaryString); $i+=5) {
$n = bindec(substr($binaryString,$i,5));
$hash = $hash.$this->base32Mapping[$n];
$n = bindec(substr($binaryString,$i,5));
$hash = $hash.$this->base32Mapping[$n];
}
return $hash;
}
Expand All @@ -99,8 +99,7 @@ public function decode($hash, $error = false) {
for ($i = 0; $i < $binaryLength; $i++) {
($i % 2 == 0) ? ($lonbits .= $latlonbits[$i]) : ($latbits .= $latlonbits[$i]);
}
echo $latbits;
echo "\n ". $lonbits . "\n";

// Get the Coordinates
$latitude = $this->getCoordinate(-90, 90, $latbits);
$longitude = $this->getCoordinate(-180, 180, $lonbits);
Expand Down Expand Up @@ -153,4 +152,4 @@ public function getBits($coordinate, $min, $max, $bitsLength) {
}
return $binaryString;
}
}
}

0 comments on commit 351280f

Please sign in to comment.