Google Geocoding API からデータを取得できなかったような気がします。
\n"; $echo = $echo . ""; if (isset($json['http'])) $echo = $echo . "HTTP {$json['http']}\n"; } else { $json_body = $json['body']; $contents = json_decode($json_body); // var_dump($contents); // var_dump($contents->status); if (!isset($contents->status)){ $error = 'json'; $echo = $echo . "
"; $echo = $echo . "{$json['stat']}
{$contents}
はわわ、何かのエラーです。
"; $echo = $echo . "{$json_body}"; // var_dump($error_mes); } elseif ($contents->status != 'OK'){ $error = 'staus'; if ($contents->status == 'ZERO_RESULTS'){ $error_mes = $contents->status.': 住所が見つかりません。'; } elseif ($contents->status == 'OVER_QUERY_LIMIT'){ $error_mes = $contents->status.': 現在検索できません。'; } elseif ($contents->status == 'REQUEST_DENIED'){ $error_mes = $contents->status.': 要求が成立しませんでした。'; } elseif ($contents->status == 'INVALID_REQUEST'){ $error_mes = $contents->status.': クエリーが不正です。'; } } else { $error = 'noerror'; } if ($error == 'json'){ } elseif ($error == 'status'){ $echo = $echo . '
'.$error_mes.'
'; } else { $echo = $echo . '"; $echo = $echo . $val->formatted_address; $echo = $echo . '
'; $echo = $echo . "geometry->location->lat}%2C{$val->geometry->location->lng}\" class=\"external-link\">"; if ($get_image == 'on') { $echo = $echo . "geometry->location->lat}%2C{$val->geometry->location->lng}&sensor=false&size=140x140&zoom=13\" width=\"140\" height=\"140\" />"; } else { $echo = $echo . "→Google Maps で確認"; } $echo = $echo . ""; $echo = $echo . '位置情報の取得には Google Geocoding API を利用しています。
'."\n".'