Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
CLLocationManagerによって返された位置情報が有効かどうかを確認するにはどうすればよいですか?
タイムスタンプと hdop (水平精度) の 2 つを確認します。1 つ目は読み取りがいつ行われたかを示し、2 つ目は読み取りのエラーのレベルを示します。たとえば、1000 の hdop は、測定が 1000 メートル以内の精度であることを示します。明らかに hdop が低いほど良いです。
それらは両方とも、取得する Core Location アップデートに含まれています。
また、水平精度が負の場合、緯度と経度は無効です。