auのGPSを使用してgoogle MAP API表示を携帯でやってみた。
今まではyahooの地図を使用していたが。
http://gakuden.net/gps/gps0.php
こちらで一覧表示可能(認証あり)
https://gakuden.net/gps/s/gps_syousai_google.php
※auのGPSで取得するデータは60進法なので
このデータをまず10進法変更しなければいけない。
preg_match(“/^([\+\-0-9]+)\.([0-9]+)\.([0-9.]+)$/”, $idox , $lat_match); preg_match(“/^([\+\-0-9]+)\.([0-9]+)\.([0-9.]+)$/”, $keidox , $lon_match); $idox = $lat_match[1] + ($lat_match[2] / 60) + ($lat_match[3] / 60 / 60); |
※以前の履歴データを使う場合、東京測地系を使っていたので
若干の誤差修正。色々計算で出すのがめんどくさく、目で見て補正しちゃいました。
//測地系補正 $idox = $idox + 0.003216111111111111; $keidox = $keidox – 0.0029727777777777775; |
Related Articles
No user responded in this post
Leave A Reply
Please Note: Comment moderation maybe active so there is no need to resubmit your comments