Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // --------------------------------------------------------
- // GPS情報取得
- // --------------------------------------------------------
- // 緯度経度格納変数
- latitude_value = "";
- longitude_value = "";
- function gpsInitiate(){
- navigator.geolocation.getCurrentPosition(
- function(position){
- latitude_value = position.coords.latitude;
- longitude_value = position.coords.longitude;
- alert("位置情報取得完了!");
- },
- function(error){
- alert("位置情報取得エラー");
- },
- {
- enableHighAccuracy : true,
- timeout : 20000,
- maximumAge : 20000,
- }
- );
- }
- gpsInitiate();// 位置情報取得開始
Add Comment
Please, Sign In to add comment