• forked:歩こう!ガイド
Import an externally hosted application
Check style

  • JavaScript
  • CSS
  • HTML
  • Images
  • Input Data
  • ReadMe
  • forked:歩こう!ガイド
  • jquery-1.7.1.min.js  
  • http://code.jquery.com/jquery-1.11.1.min.js  
  • http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.js  
  •  
  • history

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
 100
 
// グローバル変数http://app.linkdata.org/tutorial/api/2.0/index.html
spot_data       = new Array();  // スポットデータ
spotBus_data    = new Array();  // 最寄りスポットデータ
busRoute_data   = new Array();  // バス系統データ
busStop_data    = new Array();  // バス停データ
sta_data        = new Array();  // 駅データ
 
arSpot_data     = new Array();  // 近い順スポットデータ
arBusStop_data  = new Array();  // 近い順バス停データ
arBusStopL_data = new Array();  // 近い順3件だけのバス停データ
 
var user_lat    = '';           // ユーザの緯度
var user_lng    = '';           // ユーザの経度
 
var imgSrcNoImg     = '<img src="http://app.linkdata.org/asset/135ff188.png">'; // 画像が無い時用の画像のURLタグ
 
// ページが表示されたときに関数を呼び出す
$('#around').bind('pageshow',showArData);
$('#moreArSpot').bind('pageshow',showMoreArSpotData);
$('#moreArBusStop').bind('pageshow',showMoreArBusStopData);
$('#spot').bind('pageshow',showSpotData);
$('#bus').bind('pageshow',showBusRouteData);
$('#sta').bind('pageshow',showStaData);
 
 
// 画面起動時の関数
window.onload = function() {
    // 現在位置の取得
    getGeoLocation();
    //setGeo1();
    //setGeo2();
    //setGeo3();
    //setGeo0();
    // データの読み込み
    loadSpotData();
    loadBusStopData();
    loadBusRouteData();
    loadSpotBusData();
}
 
//#######################################################################################
//  周辺情報ページ関連
//#######################################################################################
function showArData() {
    makeArSpotData();
    makeArBusStopData();
    showArList();
    showArBusStopList();
}
 
 
//---------------------
// 現在位置を取得
//---------------------
//user_lat  = '30'; user_lng    = '130';    // 遠く
//user_lat  = '35.183071';  user_lng    = '136.913776'; // 清水口らへん
 
// 位置情報の取得
function getGeoLocation(){
    // HTML5 geolocation 機能で現在地を取得
    if(navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function(position) {
            // ユーザの現在位置を取得
            user_lat = position.coords.latitude;
            user_lng = position.coords.longitude;
            $('.geoLocate').empty();
            $('.geoLocate').append('GPS');
        }, function() {
            handleNoGeolocation(true);
        });
    } else {
        // ブラウザがGeolocationをサポートしていない
        handleNoGeolocation(false);
    }
}
 
// 現在位置を清水口らへんにセット
function setGeo1(){
    user_lat    = '35.183071';
    user_lng    = '136.913776';
    $('.geoLocate').empty();
    $('.geoLocate').append('清水口');
}
 
// 現在位置を二葉館らへんにセット
function setGeo2(){
    user_lat    = '35.180327';
    user_lng    = '136.918491';
    $('.geoLocate').empty();
    $('.geoLocate').append('二葉館');
    
}
 
// 現在位置を赤塚らへんにセット
function setGeo3(){
    user_lat    = '35.183372';
    user_lng    = '136.924195';
    $('.geoLocate').empty();
    $('.geoLocate').append('赤塚');
}
jquery-1.7.1.min.js
http://code.jquery.com/jquery-1.11.1.min.js
http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.js
Playing...

jquery-1.7.1.min.js
http://code.jquery.com/jquery-1.11.1.min.js
http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.js