Description
概要
位置登録時に詳細ログを調査確認用に記録する対応用のPRです。
テスト方法、確認した内容
位置登録してデータが入るか確認。
PCでの位置登録ではaltitude,altitudeAccuracy, heading.speedは0が入る
$_SERVER['USER_AGENT']とnavigator.userAgentが一応一致するか確認
TODO
問題なければ開発反映で実機テストして本番に反映
テーブル作成クエリ
CREATE TABLE `log_user_location_detail` (
`user_no` int(11) NOT NULL,
`position_id` int(11) NOT NULL,
`area_id` int(11) NOT NULL,
`longitude` float NOT NULL,
`latitude` float NOT NULL,
`altitude` float DEFAULT '0',
`accuracy` float DEFAULT '0',
`altitudeAccuracy` int(11) DEFAULT NULL,
`heading` int(11) DEFAULT NULL,
`speed` int(11) DEFAULT NULL,
`server_user_agent` char(255) DEFAULT NULL,
`browser_user_agent` char(255) DEFAULT NULL,
`reg_date` int(11) NOT NULL,
UNIQUE KEY `user_no` (`user_no`,`position_id`),
KEY `reg_date` (`reg_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;実装時参照サイト
https://developer.mozilla.org/ja/docs/Web/API/GeolocationCoordinates