Skip to content

Commit

Permalink
Update Census geocoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Stallmann committed Mar 21, 2017
1 parent 00413bb commit dcc3d4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/USCensus.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ protected function getQueryString(Address $address) {

protected function getLatLngFromResult(\stdClass $result) {
$return = FALSE;
if ($result) {
if ($result && property_exists($result, "result")) {
$result = $result->result;
if (property_exists($result, "addressMatches") && count($result->addressMatches) > 0) {
$return = new LatLng;
$return->latitude = $result->addressMatches[0]->coordinates->y;
Expand Down

0 comments on commit dcc3d4c

Please sign in to comment.