index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <!DOCTYPE html>
  2. <html>
  3. <!--
  4. Copyright (c) 2013 Mapo developers and contributors <mapo.tizen@gmail.com>
  5. This file is part of Mapo.
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. -->
  17. <head>
  18. <meta charset="utf-8" />
  19. <meta name="viewport"
  20. content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  21. <meta name="description" content="A geolocation application" />
  22. <title>Mapo</title>
  23. <link rel="stylesheet" href="./css/jquery.mobile-1.3.2.css" />
  24. <link rel="stylesheet" href="css/jqm-docs.css" />
  25. <script type="text/javascript" src="./js/jquery-1.9.1.js"></script>
  26. <script type="text/javascript" src="js/jqm-docs.js"></script>
  27. <script type="text/javascript" src="./js/jquery.mobile-1.3.2.js"></script>
  28. <script type="text/javascript">
  29. <!--
  30. var OpenLayers = null;
  31. var google = null;
  32. var gmaps = null;
  33. //-->
  34. </script>
  35. <script type="text/javascript" src="lib.js"></script>
  36. <script type="text/javascript" src="js/main.js"></script>
  37. <link rel="stylesheet" href="css/style.css" />
  38. </head>
  39. <body>
  40. <!-- Page 1 : My position -->
  41. <div data-role="page" id="position" class="ui-page">
  42. <div data-role="header" data-id="myHeader" data-position="fixed">
  43. <!-- <input type="button" onclick="getLocation()" value="Position"/> -->
  44. <a href="javascript:void(0);" data-role="button"
  45. onclick="getLocation(true)" id="home" class="ui-btn-left"
  46. data-mini="true" data-icon="home">Update</a>
  47. <h1 class="ui-title">MAPO</h1>
  48. <a data-role="button" id="exit" class="ui-btn-right-mini"
  49. data-icon="delete" onclick="quit()">Exit</a>
  50. <div data-role="navbar">
  51. <ul>
  52. <li><a href="#position" class="ui-btn-active ui-state-persist">Position</a></li>
  53. <li><a href="#map">Map</a></li>
  54. <li><a href="#settings">Settings</a></li>
  55. <li><a href="#about">About</a></li>
  56. </ul>
  57. </div>
  58. <!-- /navbar -->
  59. </div>
  60. <!-- /header -->
  61. <div data-role="content">
  62. <form>
  63. <center>
  64. <p id="locationInfo">
  65. Last saved position: <br />(Press "Update" to refresh position)
  66. </p>
  67. <table>
  68. <tr>
  69. <td><label for=lat>Latitude (N+/S-):
  70. </label></td>
  71. <td><input type="text" id="lat" value="52.165"
  72. onChange="changeLat(lat.value);" /></td>
  73. </tr>
  74. <tr>
  75. <td><label for=lon>Longitude (W+/E-):
  76. </label></td>
  77. <td><input type="text" id="lon" value="-2.21"
  78. onChange="changeLon();" /></td>
  79. </tr>
  80. </table>
  81. </center>
  82. <label for="dms">DMS (degree, minutes, seconds):</label> <input
  83. type="text" id="dms" value="" onChange="changeDMS();" />
  84. </form>
  85. <div data-role="collapsible" data-collapsed="true">
  86. <h3>Share:</h3>
  87. <div data-role="controlgroup">
  88. <button id="email_button" onclick="sendEmail()">Email</button>
  89. <button id="message_button" onclick="sendMessage()">Message</button>
  90. <button id="calendar_button" onclick="createCalendarEvent()">Calendar</button>
  91. <button id="contact_button" onclick="createContact()">Contact</button>
  92. <button onclick="goToURL('twitter')">Twitter (post)</button>
  93. <!--
  94. <button id="call_button" onclick="call()" style="display: none;">Call</button>
  95. <button id="bluetooth_button" onclick="sendBluetooth()" style="display: none;">Bluetooth</button>
  96. -->
  97. </div>
  98. </div>
  99. <div data-role="collapsible" data-collapsed="true">
  100. <h3>Web:</h3>
  101. <div data-role="controlgroup">
  102. <button onclick="goToURL('OSM')">OpenStreetMap</button>
  103. <button onclick="goToURL('GM')">Google Maps</button>
  104. <button onclick="goToURL('http://maps.nokia.com/${lat},${lon},16,0,0,normal.day')">HERE Maps</button>
  105. <button onclick="goToURL('https://wigle.net/map?maplat=${lat}&maplon=${lon}&mapzoom=12&startTransID=20010000-00000&endTransID=20170000-00000')">Wigle (WiFi)</button>
  106. <button onclick="goToURL('https://twitter.com/hashtag/${tag}?src=hash')">Twitter (hashtag)</button>
  107. <button onclick="goToURL('https://thingful.net/?what=sensor&z=16&thing=17e0s0cx&lat=${lat}&lng=${lon}')">ThingFul (IoT)</button>
  108. </div>
  109. </div>
  110. </div>
  111. <!-- /content -->
  112. <div data-role="footer" data-id="myFooter" data-position="fixed">
  113. Copyleft: GPL-3.0+ : http://notabug.org/tizen/mapo</div>
  114. <!-- /footer -->
  115. </div>
  116. <!-- /page #position-->
  117. <!-- Page 2 : Search a place -->
  118. <div data-role="page" id="map" class="ui-page">
  119. <div data-role="header" data-id="myHeader" data-position="fixed">
  120. <a href="javascript:void(0);" data-role="button"
  121. onclick="getLocation(true)" id="home" class="ui-btn-left"
  122. data-icon="home">Update</a>
  123. <h1 class="ui-title">MAPO</h1>
  124. <a data-role="button" id="exit" class="ui-btn-right"
  125. data-icon="delete" onclick="quit()">Exit</a>
  126. <div data-role="navbar">
  127. <ul>
  128. <li><a href="#position">Position</a></li>
  129. <li><a href="#map" class="ui-btn-active ui-state-persist">Map</a></li>
  130. <li><a href="#settings">Settings</a></li>
  131. <li><a href="#about">About</a></li>
  132. </ul>
  133. </div>
  134. <!-- /navbar -->
  135. </div>
  136. <!-- /header -->
  137. <div data-role="content">
  138. <div id="myMap">
  139. <a data-icon="delete" onclick="quit()"> Wont work if not online,
  140. please connect to internet before restarting application Exit</a>
  141. </div>
  142. </div>
  143. <!-- /content -->
  144. <div data-role="footer" data-id="myFooter" data-position="fixed">
  145. Copyleft: GPL-3.0+ : http://notabug.org/tizen/mapo</div>
  146. <!-- /footer -->
  147. </div>
  148. <!-- /page #place-->
  149. <!-- Page 3 : Settings -->
  150. <div data-role="page" id="settings" class="ui-page">
  151. <div data-role="header" data-id="myHeader" data-position="fixed">
  152. <a href="javascript:void(0);" data-role="button"
  153. onclick="getLocation(true)" id="home" class="ui-btn-left"
  154. data-icon="home">Update</a>
  155. <h1 class="ui-title">MAPO</h1>
  156. <a data-role="button" id="exit" class="ui-btn-right"
  157. data-icon="delete" onclick="quit()">Exit</a>
  158. <div data-role="navbar">
  159. <ul>
  160. <li><a href="#position">Position</a></li>
  161. <li><a href="#map">Map</a></li>
  162. <li><a href="#settings" class="ui-btn-active ui-state-persist">Settings</a></li>
  163. <li><a href="#about">About</a></li>
  164. </ul>
  165. </div>
  166. <!-- /navbar -->
  167. </div>
  168. <!-- /header -->
  169. <div data-role="content">
  170. <table width="100%">
  171. <tr>
  172. <td><label for="switchOnline">Connection:</label></td>
  173. <td><select name="switchOnline" id="switchOnline"
  174. data-role="slider" onchange="switchOnline()">
  175. <option value="offline" selected>Offline</option>
  176. <option value="online">Online</option>
  177. </select></td>
  178. </tr>
  179. <tr>
  180. <td><label for="switchEnergy">Energy saving:</label></td>
  181. <td><select name="switchEnergy" id="switchEnergy"
  182. data-role="slider">
  183. <option value="off">Off</option>
  184. <option value="on" selected>On</option>
  185. </select></td>
  186. </tr>
  187. <tr>
  188. <td><label for="switchDeveloper">Developer mode:</label></td>
  189. <td><select name="switchDeveloper" id="switchDeveloper"
  190. data-role="slider" onchange="switchDeveloper()">
  191. <option value="off" selected>Off</option>
  192. <option value="on">On</option>
  193. </select></td>
  194. </tr>
  195. <tr>
  196. <td colspan="2"><label for="zoom">Zoom:</label> <input
  197. type="range" name="zoom" id="zoom" value="18" min="1" max="20"
  198. onchange="refresh()" /></td>
  199. </tr>
  200. </table>
  201. <div data-role="controlgroup">
  202. <button onclick="settingsLocation()">Location</button>
  203. </div>
  204. <div data-role="controlgroup">
  205. <button onclick="settings()">System</button>
  206. </div>
  207. </div>
  208. <!-- /content -->
  209. <div data-role="footer" data-id="myFooter" data-position="fixed">
  210. Copyleft: GPL-3.0+ : http://notabug.org/tizen/mapo</div>
  211. <!-- /footer -->
  212. </div>
  213. <!-- /page #options-->
  214. <!-- Page 4 : about -->
  215. <div data-role="page" id="about" class="ui-page">
  216. <div data-role="header" data-id="myHeader" data-position="fixed">
  217. <a href="javascript:void(0);" data-role="button"
  218. onclick="getLocation(true)" id="home" class="ui-btn-left"
  219. data-icon="home">Update</a>
  220. <h1 class="ui-title">MAPO</h1>
  221. <a data-role="button" id="exit" class="ui-btn-right"
  222. data-icon="delete" onclick="quit()">Exit</a>
  223. <div data-role="navbar">
  224. <ul>
  225. <li><a href="#position">Position</a></li>
  226. <li><a href="#map">Map</a></li>
  227. <li><a href="#settings">Settings</a></li>
  228. <li><a href="#about" class="ui-btn-active ui-state-persist">About</a></li>
  229. </ul>
  230. </div>
  231. <!-- /navbar -->
  232. </div>
  233. <!-- /header -->
  234. <div data-role="content">
  235. <div>
  236. <h3>Mapo geoloc</h3>
  237. This application is Free Libre and Open Source Software (licenced
  238. under GPL-3.0+)<br />
  239. </div>
  240. <div data-role="collapsible" data-collapsed="true" id="logView"
  241. style="visibility: hidden;">
  242. <h3>Developer Log:</h3>
  243. <div data-role="controlgroup">
  244. <div id="console"></div>
  245. </div>
  246. </div>
  247. <div data-role="collapsible" data-collapsed="true" id="recordView"
  248. style="visibility: hidden;">
  249. <h3>Extras:</h3>
  250. <h4>Record :</h4>
  251. <div data-role="controlgroup">
  252. <table width="100%">
  253. <tr>
  254. <td><label for="switchRecord">Record:</label></td>
  255. <td><select name="switchRecord" id="switchRecord"
  256. data-role="slider" onchange="record()">
  257. <option value="stop">Stop</option>
  258. <option value="start">Start</option>
  259. </select></td>
  260. </tr>
  261. </table>
  262. <label for="selectorTimeout">Sampling rate (seconds):</label> <input
  263. type="range" name="selectorTimeout" id="selectorTimeout"
  264. value="10" min="1" max="100" />
  265. </div>
  266. <h4>Picture:</h4>
  267. <div data-role="controlgroup">
  268. Make picture : <input id="capture" type="file" accept="image/*"
  269. capture="camera" name="file" /> <img id="picture" src=""
  270. width="100%" alt="Capture first" />
  271. </div>
  272. </div>
  273. <div>
  274. <center>
  275. <img src="icon.png" />
  276. </center>
  277. <p>
  278. You're welcome to contribute and be part of the project.<br />
  279. Support can be provided, join tizen devolopers channels.
  280. </p>
  281. </div>
  282. <h3>CREDITS / THANKS</h3>
  283. <ul>
  284. <li>Philippe Coval
  285. <li>Theo Gerin
  286. <li>Sebastien Bocahu
  287. <li>OpenLayers.org
  288. <li>maps.google.com
  289. <li>Tizen project
  290. <li>TizenExperts
  291. <li>BeMyApp
  292. <li>LinuxFoundation
  293. <li>Samsung OSG
  294. <li>Intel OTC
  295. <li>Eurogiciel Opensource Dept
  296. </ul>
  297. </div>
  298. <!-- /content -->
  299. <div data-role="footer" data-id="myFooter" data-position="fixed">
  300. Copyleft: GPL-3.0+ : http://notabug.org/tizen/mapo</div>
  301. <!-- /footer -->
  302. </div>
  303. <!-- /page #about-->
  304. <!-- cache version -->
  305. <script type="text/javascript" src="http://openlayers.org/api/OpenLayers.js"></script>
  306. <script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
  307. </body>
  308. </html>