cindex.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Welcome to SkyAI</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <!--<meta http-equiv="refresh" content="5">-->
  8. <meta http-equiv="pragma" content="no-cache">
  9. <meta http-equiv="Cache-Control" CONTENT="no-cache, must-revalidate">
  10. <meta http-equiv="expires" content="365 days">
  11. <script src="../static/js/jquery.min.js"></script>
  12. <link rel="stylesheet" href="../static/css/bootstrap.min.css">
  13. <script src="../static/js/bootstrap.min.js"></script>
  14. <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.2.1/bootstrap-slider.min.js"></script>
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.2.1/css/bootstrap-slider.min.css">
  16. <link rel="stylesheet" href="../static/css/generalstyle.css?<?php echo rand(0,512);?>">
  17. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  18. <meta name="viewport" content="width=device-width, initial-scale=1">
  19. <script type="text/javascript"
  20. src="https://maps.googleapis.com/maps/api/js">
  21. </script>
  22. <style >
  23. html, body, #map-canvas {width:100%; height: 100%;}
  24. </style>
  25. <script>
  26. {% if params.gps %}
  27. var lat = {{params.gps[0].lat}};
  28. var lng = {{params.gps[0].lng}};
  29. {% else %}
  30. var lat = 22.707340;
  31. var lng = 120.531000;
  32. {% endif %}
  33. function initialize() {
  34. var a = -1;
  35. var mapOptions = {
  36. center: { lat: lat, lng: lng},
  37. zoom: 19,
  38. mapTypeId: 'satellite',
  39. };
  40. var position1 = {
  41. lat: 22.707508,
  42. lng: 120.532132
  43. };
  44. var position2 = {
  45. lat: 22.706996,
  46. lng: 120.529765
  47. };
  48. var position3 = {
  49. lat: 22.707200,
  50. lng: 120.532090
  51. };
  52. var position4 = {
  53. lat: 22.706900,
  54. lng: 120.532040
  55. };
  56. var position5 = {
  57. lat: 22.706684,
  58. lng: 120.531459
  59. };
  60. var position6 = {
  61. lat: 22.706813,
  62. lng: 120.530876
  63. };
  64. var position7 = {
  65. lat: 22.707066,
  66. lng: 120.531099
  67. };
  68. var position8 = {
  69. lat: 22.707340,
  70. lng: 120.531166
  71. };
  72. var position9 = {
  73. lat: 22.707611,
  74. lng: 120.531440
  75. };
  76. var position10 = {
  77. lat: 22.707549,
  78. lng: 120.531845
  79. };
  80. var position11 = {
  81. lat: 22.707300,
  82. lng: 120.529820
  83. };
  84. var position12 = {
  85. lat: 22.707576,
  86. lng: 120.529871
  87. };
  88. var position13 = {
  89. lat: 22.707791,
  90. lng: 120.530245
  91. };
  92. var position14 = {
  93. lat: 22.707726,
  94. lng: 120.530770
  95. };
  96. var position15 = {
  97. lat: 22.707360,
  98. lng: 120.531087
  99. };
  100. var position16 = {
  101. lat: 22.707086,
  102. lng: 120.531013
  103. };
  104. var position17 = {
  105. lat: 22.706867,
  106. lng: 120.530592
  107. };
  108. var position18 = {
  109. lat: 22.706946,
  110. lng: 120.530130
  111. };
  112. var map = new google.maps.Map(
  113. document.getElementById('map-canvas'),
  114. mapOptions);
  115. var marker1 = new google.maps.Marker({
  116. position: position1,
  117. map: map,
  118. label: '1'
  119. });
  120. var contentString ='<div id="content">' +
  121. "<img src='img/PV.jpg' id='img' style='max-width:100%;height:auto;'/>"+
  122. "</div>";
  123. var infowindow = new google.maps.InfoWindow({
  124. content:contentString});
  125. marker1.addListener('click',function(){
  126. a = a * -1;
  127. if(a > 0){
  128. infowindow.open(map, marker1);
  129. }else{
  130. infowindow.close();
  131. }
  132. });
  133. var marker2 = new google.maps.Marker({
  134. position: position2,
  135. map: map,
  136. label: '2'
  137. });
  138. var marker3 = new google.maps.Marker({
  139. position: position3,
  140. map: map,
  141. label: '3'
  142. });
  143. var marker4 = new google.maps.Marker({
  144. position: position4,
  145. map: map,
  146. label: '4'
  147. });
  148. var marker5 = new google.maps.Marker({
  149. position: position5,
  150. map: map,
  151. label: '5'
  152. });
  153. var marker6 = new google.maps.Marker({
  154. position: position6,
  155. map: map,
  156. label: '6'
  157. });
  158. var marker7 = new google.maps.Marker({
  159. position: position7,
  160. map: map,
  161. label: '7'
  162. });
  163. var marker8 = new google.maps.Marker({
  164. position: position8,
  165. map: map,
  166. label: '8'
  167. });
  168. var marker9 = new google.maps.Marker({
  169. position: position9,
  170. map: map,
  171. label: '9'
  172. });
  173. var marker10 = new google.maps.Marker({
  174. position: position10,
  175. map: map,
  176. label: '10'
  177. });
  178. var marker11 = new google.maps.Marker({
  179. position: position11,
  180. map: map,
  181. label: '11'
  182. });
  183. var marker12 = new google.maps.Marker({
  184. position: position12,
  185. map: map,
  186. label: '12'
  187. });
  188. var marker13 = new google.maps.Marker({
  189. position: position13,
  190. map: map,
  191. label: '13'
  192. });
  193. var marker14 = new google.maps.Marker({
  194. position: position14,
  195. map: map,
  196. label: '14'
  197. });
  198. var marker15 = new google.maps.Marker({
  199. position: position15,
  200. map: map,
  201. label: '15'
  202. });
  203. var marker16 = new google.maps.Marker({
  204. position: position16,
  205. map: map,
  206. label: '16'
  207. });
  208. var marker17 = new google.maps.Marker({
  209. position: position17,
  210. map: map,
  211. label: '17'
  212. });
  213. var marker18 = new google.maps.Marker({
  214. position: position18,
  215. map: map,
  216. label: '18'
  217. });
  218. var trackPoints = [
  219. {% for g in params.gps %}
  220. new google.maps.LatLng({{g.lat}},{{g.lng}}),
  221. {% endfor %}
  222. ];
  223. var trackPath = new google.maps.Polyline({
  224. path: trackPoints,
  225. strokeColor: "#FF0000", // 線條顏色
  226. strokeOpacity: 1.0, // 線條透明度
  227. strokeWeight: 2 // 線條粗細
  228. });
  229. trackPath.setMap(map);
  230. }
  231. google.maps.event.addDomListener(
  232. window, 'load', initialize);
  233. $(function(){
  234. {% if params.queryDate %}
  235. {% if params.month < 10 %}
  236. var month = '0' + {{params.month}};
  237. {% else %}
  238. var month = {{params.month}};
  239. {% endif %}
  240. {% if params.day < 10 %}
  241. var day = '0' + {{params.day}};
  242. {% else %}
  243. var day = {{params.day}};
  244. {% endif %}
  245. $("input[name=date]").val({{params.year}} + '-' + month + '-' + day);
  246. {% endif %}
  247. });
  248. </script>
  249. <style>
  250. .bg{
  251. position:static;
  252. width:100%;
  253. height: 358px;
  254. display:block;
  255. margin:auto;
  256. background-position: 0px 0px;
  257. background-repeat: no-repeat;
  258. background-size: 100% 100%;
  259. }
  260. .logo {
  261. width:35%;
  262. height:100px;
  263. border: 0px;
  264. background-color: #EF7F33;
  265. color:#172987;
  266. text-align:center;
  267. font-size:48px;
  268. margin: auto;
  269. font-family:DFKai-sb;
  270. font-weight:bold;
  271. margin-bottom:15px;
  272. }
  273. button {
  274. background-color: white;
  275. border-radius:10px;
  276. border: 3px solid lightgray;
  277. }
  278. img {
  279. display: block;
  280. margin-left: auto;
  281. margin-right: auto;
  282. }
  283. .img1 {
  284. display: block;
  285. margin-left: auto;
  286. margin-right: auto;
  287. margin: auto;
  288. }
  289. .detail{
  290. font-family: Microsoft JhengHei;
  291. border-radius: 100px;
  292. background-color: #008CBA;
  293. border: none;
  294. color: white;
  295. padding: 5px 12px;
  296. text-align: center;
  297. text-decoration: none;
  298. display: inline-block;
  299. font-size: 1.4em;
  300. margin: 4px 2px;
  301. cursor: pointer;
  302. transition-duration: 0.4s;
  303. border: 3px solid white;
  304. }
  305. .detail:hover {
  306. background-color: white;
  307. color: black;
  308. border: 3px solid black;
  309. }
  310. .title{
  311. font-family: Microsoft JhengHei;
  312. border-radius: 100px;
  313. background-color: #f2f2f2;
  314. border: none;
  315. color: black;
  316. padding: 10px 32px;
  317. font-size: 2em;
  318. }
  319. .font {
  320. color: white;
  321. font-size: 1.4em;
  322. }
  323. .font:hover {
  324. color: black;
  325. font-size: 1.5em;
  326. }
  327. .choosed {
  328. width: 40px;
  329. font-size: 1.5em;
  330. border: 1px;
  331. border-radius: 100px;
  332. border: 3px solid red;
  333. background-color: white;
  334. }
  335. .sw_number {
  336. width: 40px;
  337. font-size: 1.5em;
  338. border: 1px;
  339. border-radius: 100px;
  340. border: 3px solid lightgray;
  341. }
  342. </style>
  343. </head>
  344. <body>
  345. <div class="container">
  346. <div id="header" class="row" style="background-color:#ffffff;">
  347. <div class="col-md-12" style="text-align:center;margin-top:5px;">
  348. <div class="col-md-4 col-sm-12" style="">
  349. <img src="../static/img/logo_new.png" width="60%" height="30%">
  350. </div>
  351. <div class="col-md-4 col-sm-12" style="">
  352. <a href="/cindex/{{params.tid}}"><button class="btn btn-primary btn-lg" style="">車輛軌跡</button></a>
  353. <a href="/cshoot_setting/{{params.tid}}"><button class="btn btn-danger btn-lg" style="">拍攝設定</button></a>
  354. <a href="/cimg_history/{{params.tid}}"><button class="btn btn-danger btn-lg" style="">歷史資料</button></a>
  355. <a href="/aindex"><button class="btn btn-danger btn-lg" style="">毛豆田</button></a>
  356. </div>
  357. <div class="col-md-4 col-sm-12" style="">
  358. <a href="/logout"><button class="btn btn-primary btn-lg" style="">登出</button></a>
  359. </div>
  360. </div>
  361. </div>
  362. <div class="col-md-12" style="background-color:red;width:100%;height:5px;margin-top:5px;margin-bottom:20px"></div>
  363. <div class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:15px;border:1px;border-radius: 35px;">
  364. <center>
  365. <h1>{{params.tid}} 號 車輛軌跡</h1>
  366. <p style="text-align:center;font-weight:bold;font-size: 1.7em;">請選擇查詢日期:</p>
  367. <form action="/cindex/{{params.tid}}" method="post">
  368. <input type="date" name="date">
  369. <input type="submit" value="查詢">
  370. </form>
  371. <a href="/cindex/1"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">1</button></a>
  372. <a href="/cindex/2"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">2</button></a>
  373. <a href="/cindex/3"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">3</button></a>
  374. <br>
  375. <div id="map-canvas" class="col-sm-12" style="text-align:center;background-color:#f2f2f2;padding:280px;border:1px;border-radius: 35px;"></div>
  376. </center>
  377. </div>
  378. </div>
  379. </body>
  380. </html>