【调度系统】广东民航医疗快线调度系统源代码
wlzboy
2025-09-06 2decf5219e3476e30095fd9dbf6e49c55e105563
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>  
<!--#include virtual="/inc/odbc.asp"-->
<!--#include file="JsonPost.gds"-->
<%
CarID    = trim(request("CarID"))
If CarID="" Then Response.Redirect "/"
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select CarLicense,GPS_IMEI from CarData where CarID="&CarID
rs.open Sql,objConn,1,1
If not rs.Eof Then
CarLicense    = rs("CarLicense")
imeis        = rs("GPS_IMEI")
End If
rs.close()
 
 
appUrl="http://api.gpsoo.net/1/devices/tracking"
 
args1="access_token="&access_token
args1=args1&"&imeis="&imeis&"&map_type=BAIDU&time="&ToUnixTime(now(),0)
 
appUrl="http://api.gpsoo.net/1/devices/history"
args1="access_token="&access_token
args1=args1&"&imei="&imeis&"&map_type=BAIDU&account="&account&"&begin_time="&ToUnixTime("2018-1-5 0:00:00",0)&"&end_time="&ToUnixTime(now(),0)&"&time="&ToUnixTime(now(),0)
 
'args1=args1&"&map_type=BAIDU"        '如果要显示在百度地图上,map_type=BAIDU此时返回的经纬度将经过baidu校准方式校准,如果要显示在google地图上,map_type=GOOGLE,此时返回的经纬度将经过google校准方式校准,map_type如果不填,则返回原始经纬度
 
 
HTMLCODE= GetBody(appUrl,args1)
'Response.Write args1&"<br><br>"
'HTMLCODE= PostBody(appUrl,args1)
'Response.Write HTMLCODE &"<br>"
 
json    = HTMLCODE
%>
    <script language="JScript" runat="Server"> 
    function toObject(json) { 
        eval("var o=" + json); 
        return o; 
    } 
    function toArray(s){
        var dic = Server.CreateObject("Scripting.Dictionary")
        eval("var a=" + json);
        for(var i=0;i<a.length;i++){
            var obj = Server.CreateObject("Scripting.Dictionary")
            for(x in a[i]) obj.Add(x,a[i][x])
            dic.Add(i, obj);
        }
        return dic
    }
    </script> 
    
    <script language="jscript" runat="server">
    Array.prototype.get = function(i)
    {
     return this[i]; 
    };
    function getjson(str){
     try{
      eval("var jsonStr = (" + str + ")");
     }catch(ex){
      var jsonStr = null;
     }
     return jsonStr;
    }
    </script>
    <%
    str=json
    str=right(str,len(str)-instr(str,"[")+1)
    str=left(str,InstrRev(str,"]"))
    dim obj
    set obj = getjson(str)
    str0=""
    data_lng        = obj.get(0).lng            '经度
    data_lat        = obj.get(0).lat            '纬度
'Response.end
%>
 
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <meta http-equiv="refresh" content="100">
    <style type="text/css">
        body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;}
        #golist {display: none;}
        @media (max-device-width: 780px){#golist{display: block !important;}}
    </style>
    <script type="text/javascript" src="http://api.map.baidu.com/api?ak=TE9OTtYm29ALeP84zCsaGNCFxsBoCaj2&v=2.0"></script>
    <title><%=CarLicense%>实时位置</title>
</head>
<body>
    <div id="allmap"></div>
</body>
</html>
<script type="text/javascript">
    // 百度地图API功能
    var map = new BMap.Map("allmap");    // 创建Map实例
    map.centerAndZoom(new BMap.Point(<%=data_lng%>, <%=data_lat%>), 14);  // 初始化地图,设置中心点坐标和地图级别
    map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
  var sy = new BMap.Symbol(BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW, {
    scale: 0.6,//图标缩放大小
    strokeColor:'#fff',//设置矢量图标的线填充颜色
    strokeWeight: '2',//设置线宽
});
var icons = new BMap.IconSequence(sy, '10', '30');
// 创建polyline对象
var pois = [
    <%for i=0 to obj.length-1
            gps_time        = obj.get(i).gps_time
            data_lng        = obj.get(i).lng            '经度
            data_lat        = obj.get(i).lat            '纬度
            data_course        = obj.get(i).course            '航向
            data_speed        = obj.get(i).speed            '速度
    %>
        new BMap.Point(<%=data_lng%>,<%=data_lat%>)<%if i<obj.length-1 then Response.Write ","%>
    <%'Response.Write data_lng&","&data_lat&"<br>"
    Next%>
];
var polyline =new BMap.Polyline(pois, {
   enableEditing: false,//是否启用线编辑,默认为false
   enableClicking: true,//是否响应点击事件,默认为true
   icons:[icons],
   strokeWeight:'8',//折线的宽度,以像素为单位
   strokeOpacity: 0.8,//折线的透明度,取值范围0 - 1
   strokeColor:"#18a45b" //折线颜色
});
 
map.addOverlay(polyline);          //增加折线
map.centerAndZoom(new BMap.Point(<%=data_lng%>, <%=data_lat%>), 14);
  
</script>