index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  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()" 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. <p id="locationInfo">Last saved position, <br/>
  64. press "Update" to refresh position</p>
  65. <center>
  66. <table>
  67. <tr>
  68. <td><label for=lat>Latitude (N+/S-):
  69. </label></td>
  70. <td><input type="text" id="lat" value="52.165"
  71. onChange="changeLat(lat.value);" /></td>
  72. </tr>
  73. <tr>
  74. <td><label for=lon>Longitude (W+/E-):
  75. </label></td>
  76. <td><input type="text" id="lon" value="-2.21"
  77. onChange="changeLon();" /></td>
  78. </tr>
  79. </table>
  80. </center>
  81. <label for="dms">DMS (degree, minutes, seconds):</label> <input
  82. type="text" id="dms" value="" onChange="changeDMS();" />
  83. </form>
  84. <div data-role="collapsible" data-collapsed="true">
  85. <h3>Share:</h3>
  86. <div data-role="controlgroup">
  87. <button id="email_button" onclick="sendEmail()">Email</button>
  88. <button id="message_button" onclick="sendMessage()">Message</button>
  89. <button id="calendar_button" onclick="createCalendarEvent()">Calendar</button>
  90. <button id="contact_button" onclick="createContact()">Contact</button>
  91. <button onclick="goToURL('twitter')">Twitter (post)</button>
  92. <!--
  93. <button id="call_button" onclick="call()" style="display: none;">Call</button>
  94. <button id="bluetooth_button" onclick="sendBluetooth()" style="display: none;">Bluetooth</button>
  95. -->
  96. </div>
  97. </div>
  98. <div data-role="collapsible" data-collapsed="true">
  99. <h3>Web:</h3>
  100. <div data-role="controlgroup">
  101. <button onclick="goToURL('OSM')">OpenStreetMap</button>
  102. <button onclick="goToURL('GM')">Google Maps</button>
  103. <button onclick="goToURL('http://maps.nokia.com/${lat},${lon},16,0,0,normal.day')">HERE Maps</button>
  104. <button onclick="goToURL('https://wigle.net/map?maplat=${lat}&maplon=${lon}&mapzoom=12&startTransID=20010000-00000&endTransID=20170000-00000')">Wigle (WiFi)</button>
  105. <button onclick="goToURL('https://twitter.com/hashtag/${tag}?src=hash')">Twitter (hashtag)</button>
  106. <button onclick="goToURL('https://thingful.net/?what=sensor&z=16&thing=17e0s0cx&lat=${lat}&lng=${lon}')">ThingFul (IoT)</button>
  107. </div>
  108. </div>
  109. <div data-role="collapsible" data-collapsed="true">
  110. <h3>Extras:</h3>
  111. <div data-role="controlgroup">
  112. Make picture :
  113. <input id="capture" type="file" accept="image/*" capture="camera" name="file" />
  114. <img id="picture" src="" width="100%" alt="Capture first" />
  115. </div>
  116. </div>
  117. </div>
  118. <!-- /content -->
  119. <div data-role="footer" data-id="myFooter" data-position="fixed">
  120. Copyleft: GPL-3.0+ : http://notabug.org/tizen/mapo</div>
  121. <!-- /footer -->
  122. </div>
  123. <!-- /page #position-->
  124. <!-- Page 2 : Search a place -->
  125. <div data-role="page" id="map" class="ui-page">
  126. <div data-role="header" data-id="myHeader" data-position="fixed">
  127. <a href="javascript:void(0);" data-role="button"
  128. onclick="getLocation()" id="home" class="ui-btn-left"
  129. data-icon="home">Update</a>
  130. <h1 class="ui-title">MAPO</h1>
  131. <a data-role="button" id="exit" class="ui-btn-right"
  132. data-icon="delete" onclick="quit()">Exit</a>
  133. <div data-role="navbar">
  134. <ul>
  135. <li><a href="#position">Position</a></li>
  136. <li><a href="#map" class="ui-btn-active ui-state-persist">Map</a></li>
  137. <li><a href="#settings">Settings</a></li>
  138. <li><a href="#about">About</a></li>
  139. </ul>
  140. </div>
  141. <!-- /navbar -->
  142. </div>
  143. <!-- /header -->
  144. <div data-role="content">
  145. <div id="myMap">
  146. <a data-icon="delete" onclick="quit()"> Wont work if not online,
  147. please connect to internet before restarting application Exit</a>
  148. </div>
  149. </div>
  150. <!-- /content -->
  151. <div data-role="footer" data-id="myFooter" data-position="fixed">
  152. Copyleft: GPL-3.0+ : http://notabug.org/tizen/mapo</div>
  153. <!-- /footer -->
  154. </div>
  155. <!-- /page #place-->
  156. <!-- Page 3 : Settings -->
  157. <div data-role="page" id="settings" class="ui-page">
  158. <div data-role="header" data-id="myHeader" data-position="fixed">
  159. <a href="javascript:void(0);" data-role="button"
  160. onclick="getLocation()" id="home" class="ui-btn-left"
  161. data-icon="home">Update</a>
  162. <h1 class="ui-title">MAPO</h1>
  163. <a data-role="button" id="exit" class="ui-btn-right"
  164. data-icon="delete" onclick="quit()">Exit</a>
  165. <div data-role="navbar">
  166. <ul>
  167. <li><a href="#position">Position</a></li>
  168. <li><a href="#map">Map</a></li>
  169. <li><a href="#settings" class="ui-btn-active ui-state-persist">Settings</a></li>
  170. <li><a href="#about">About</a></li>
  171. </ul>
  172. </div>
  173. <!-- /navbar -->
  174. </div>
  175. <!-- /header -->
  176. <div data-role="content">
  177. <table width="100%">
  178. <tr>
  179. <td><label for="switchOnline">Connection:</label></td>
  180. <td><select name="switchOnline" id="switchOnline"
  181. data-role="slider" onchange="switchOnline()">
  182. <option value="offline" selected>Offline</option>
  183. <option value="online">Online</option>
  184. </select></td>
  185. </tr>
  186. <tr>
  187. <td><label for="switchEnergy">Energy saving:</label></td>
  188. <td><select name="switchEnergy" id="switchEnergy"
  189. data-role="slider">
  190. <option value="off">Off</option>
  191. <option value="on" selected>On</option>
  192. </select></td>
  193. </tr>
  194. <tr>
  195. <td><label for="switchDeveloper">Developer mode:</label></td>
  196. <td><select name="switchDeveloper" id="switchDeveloper"
  197. data-role="slider" onchange="switchDeveloper()">
  198. <option value="off" >Off</option>
  199. <option value="on" selected>On</option>
  200. </select></td>
  201. </tr>
  202. <tr>
  203. <td colspan="2"><label for="zoom">Zoom:</label> <input
  204. type="range" name="zoom" id="zoom" value="18" min="1" max="20"
  205. onchange="refresh()" /></td>
  206. </tr>
  207. </table>
  208. <div data-role="controlgroup">
  209. <button onclick="settingsLocation()">Location</button>
  210. </div>
  211. <div data-role="controlgroup">
  212. <button onclick="settings()">System</button>
  213. </div>
  214. </div>
  215. <!-- /content -->
  216. <div data-role="footer" data-id="myFooter" data-position="fixed">
  217. Copyleft: GPL-3.0+ : http://notabug.org/tizen/mapo</div>
  218. <!-- /footer -->
  219. </div>
  220. <!-- /page #options-->
  221. <!-- Page 3 : about -->
  222. <div data-role="page" id="about" class="ui-page">
  223. <div data-role="header" data-id="myHeader" data-position="fixed">
  224. <a href="javascript:void(0);" data-role="button"
  225. onclick="getLocation()" id="home" class="ui-btn-left"
  226. data-icon="home">Update</a>
  227. <h1 class="ui-title">MAPO</h1>
  228. <a data-role="button" id="exit" class="ui-btn-right"
  229. data-icon="delete" onclick="quit()">Exit</a>
  230. <div data-role="navbar">
  231. <ul>
  232. <li><a href="#position">Position</a></li>
  233. <li><a href="#map">Map</a></li>
  234. <li><a href="#settings">Settings</a></li>
  235. <li><a href="#about" class="ui-btn-active ui-state-persist">About</a></li>
  236. </ul>
  237. </div>
  238. <!-- /navbar -->
  239. </div>
  240. <!-- /header -->
  241. <div>
  242. <h3>Mapo geoloc</h3>
  243. This application is Free Libre and Open Source Software (licenced under GPL-3.0+)</br>
  244. You're welcome to contribute and make it a community managed project.</br>
  245. Support can be provided, join tizen devolopers channels.
  246. </div>
  247. <div data-role="collapsible" data-collapsed="true" id="logView"
  248. style="visibility: hidden;">
  249. <h3>Developer Log:</h3>
  250. <div data-role="controlgroup">
  251. <div id="console"></div>
  252. </div>
  253. </div>
  254. <div data-role="collapsible" data-collapsed="true" id="recordView"
  255. style="visibility: hidden;">
  256. <h3>Record:</h3>
  257. <div data-role="controlgroup">
  258. <table width="100%">
  259. <tr>
  260. <td><label for="switchRecord">Record:</label></td>
  261. <td><select name="switchRecord" id="switchRecord"
  262. data-role="slider" onchange="record()">
  263. <option value="stop">Stop</option>
  264. <option value="start">Start</option>
  265. </select></td>
  266. </tr>
  267. </table>
  268. <label for="selectorTimeout">Sampling rate (seconds):</label> <input
  269. type="range" name="selectorTimeout" id="selectorTimeout" value="10"
  270. min="1" max="100" />
  271. </div>
  272. </div>
  273. <center><img src="icon.png" /></center>
  274. <div>
  275. <h3>CREDITS / THANKS</h3>
  276. <ul>
  277. <li>Philippe Coval
  278. <li>Theo Gerin
  279. <li>Sebastien Bocahu
  280. <li>OpenLayers.org
  281. <li>maps.google.com
  282. <li>Tizen project
  283. <li>TizenExperts
  284. <li>BeMyApp
  285. <li>LinuxFoundation
  286. <li>Samsung OSG
  287. <li>Intel OTC
  288. <li>Eurogiciel Opensource Dept
  289. </ul>
  290. </div>
  291. <!-- /content -->
  292. <div data-role="footer" data-id="myFooter" data-position="fixed">
  293. Copyleft: GPL-3.0+ : http://notabug.org/tizen/mapo</div>
  294. <!-- /footer -->
  295. </div>
  296. <!-- /page #options-->
  297. <!-- cache version -->
  298. <script type="text/javascript" src="http://openlayers.org/api/OpenLayers.js"></script>
  299. <script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
  300. </body>
  301. </html>