notes.txt 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. Subject: mapo-notes
  2. ### NOTES ###
  3. Tizen Geolocation issue :
  4. https://developer.tizen.org/forums/native-application-development/device-gps-testing
  5. ### URLS ###
  6. Select maps source ie :
  7. https://maps.googleapis.com/maps/api/staticmap?center=0,0&sensor=false&size=512x512&zoom=5
  8. <select>
  9. <option value="http://www.openstreetmap.org/?&zoom=10&layers=B00FTF&lat={lat}&lon={lon}"
  10. >OpenStreetMap</option>
  11. <option value="http://maps.google.com/maps?&z={z}&ll=${icbm}">
  12. Google maps
  13. </option>
  14. <!--
  15. Rzr :
  16. url = http://rzr.online.fr/geo/${lat},${lon}
  17. OpenStreetMap :
  18. url = "http://www.openstreetmap.org/?&zoom=10&layers=mapnik&lat=${lat}&lon=${lon}"
  19. Wikimapia :
  20. url = http://www.wikimapia.org/#y=${lat}&x=${lon}&z=13&l=2&m=a&v=2
  21. $s = "http://www.wikimapia.org/#y=" . $la . "&x=" . $lo . "&z=13&l=2&m=a&v=2";
  22. printLink( $s , "Wikimapia" );
  23. Nokia :
  24. url = "http://maps.nokia.com/${lat},${lon},16,0,0,normal.day"
  25. $s = "http://maps.nokia.com/";
  26. $s= $s . $la . "," . $lo . ",16,0,0,normal.day";
  27. printLink( $s , "nokia" );
  28. Bing :
  29. url = "http://www.multimap.com/map/browse.cgi?&scale=5000&icon=x&lat=${lat}&lon=${lon}"
  30. $s = "http://www.bing.com/maps/?&lvl=20&sty=b&cp="; //48.128854~-1.638889"
  31. $s = $s . $la . "~" . $lo ;
  32. printLink( $s , "bing" );
  33. MultiMap :
  34. url = "http://www.multimap.com/map/browse.cgi?&scale=5000&icon=x&lat=${lat}&lon=${lon}"
  35. $s = "http://www.multimap.com/map/browse.cgi?&scale=5000&icon=x&lat=" . $la . "&lon=" . $lo ;
  36. printLink( $s , "Multimap" );
  37. Flick (Iframe not allowed) :
  38. url = "http://www.flickr.com/map?&fLat=48.0867&fLon=-1.5772&zl=10"
  39. $s = "http://www.flickr.com/map?&fLat=" . $la . "&fLon=" . $lo;
  40. printLink( $s , "Flickr" );
  41. GoogleMap :
  42. url = "http://maps.google.com/maps?&z=10&ll=${lat},${lon}"
  43. $s = "http://maps.google.com/maps?&z=" . $z . "&ll=" . $icbm ;
  44. printLink( $s , "Google" );
  45. Wiggle :
  46. url = "http://wigle.net/gps/gps/Map/onlinemap/?lat1=${lat}&lon1=${lon}"
  47. $s = "http://wigle.net/gps/gps/Map/onlinemap/?lat1=" . $la . "&lon1=" . $lo ;
  48. printLink( $s , "Wigle" );
  49. Geourl :
  50. url = "http://geourl.org/near?lat=${lat}&long=${lon}"
  51. $s = "http://geourl.org/near?lat=" . $la . "&long=" . $lo ;
  52. printLink( $s , "GeoURL" );
  53. Yahoo :
  54. url = "http://maps.yahoo.com/maps_result?&lat=${lat}&lon=${lon}"
  55. $s = "http://maps.yahoo.com/maps_result?&lat=" . $la . "&lon=" . $lo ;
  56. printLink( $s , "yahoo" );
  57. Frappr :
  58. url = "http://www.frappr.com/eracket&z=16&t=0&cx=${lat}&cy=${lon}"
  59. $s = "http://www.frappr.com/eracket&z=16&t=0&cx=" . $la . "&cy=" . $lo ;
  60. printLink( $s , "frappr");
  61. GamesWW7 :
  62. url = "http://games.ww7.be/tools/formsgeneration/test_map_location_input.php?__map_latitude=${lat}&__map_longitude=${lon}&__map_zoom=18&__map_map_type=Hybrid"
  63. $s="http://games.ww7.be/tools/formsgeneration/test_map_location_input.php?__map_latitude=$la&__map_longitude=$lo&__map_zoom=18&__map_map_type=Hybrid";
  64. printLink( $s , "form");
  65. Flasheart :
  66. url = "http://www.flashearth.com/?&z=12.1&r=0&src=2&lat=${lat}&lon=${lon}"
  67. $s="http://www.flashearth.com/?&z=12.1&r=0&src=2&lat=" . $la . "&lon=" . $lo ;
  68. printLink( $s , "swf");
  69. InformationFreeway :
  70. url = "http://www.InformationFreeway.org/?&zoom=12&layers=0B00F000&lat=${lat}&lon=${lon}"
  71. $s="http://www.InformationFreeway.org/?" . "&zoom=12&layers=0B00F000" . "&lat=" . $la . "&lon=" . $lo ;
  72. printLink( $s , "way");
  73. if ( ! isset($icbm)) {
  74. if ( isset($geo)) { $icbm=$geo; }
  75. else if ( isset( $la) && isset($lo)) { $icbm="" . $la ."," . $lo; }
  76. }
  77. $la = preg_replace( '/(.*),.*/' , '$1' , $icbm );
  78. $lo = preg_replace( '/.*,(.*)/' , '$1' , $icbm );
  79. function decimalToAngle( $u )
  80. {
  81. $d = floor( $u );
  82. $s = ( $u - $d ) * 60. * 60.;
  83. $m = floor( $s / 60 );
  84. $s = floor( $s - 60 * $m );
  85. $t = "" . $d . "d" . $m . "m" . $s . "s";
  86. return $t;
  87. }
  88. function decimalToCoord( $lo , $la )
  89. {
  90. $t="";
  91. $t = $t . ( ( $lo < 0 ) ? "S" : "N" );
  92. if ( $lo < 0 ) { $lo = - ($lo) ; }
  93. $t = $t . decimalToAngle( $lo );
  94. $t = $t . ( ( $la < 0 ) ? "W" : "E" );
  95. if ( $la < 0 ) { $la=-($la);}
  96. $t = $t . decimalToAngle( $la );
  97. return $t;
  98. }
  99. $coord = decimalToCoord( $la , $lo );
  100. <!-- <input type="radio" name="provider" id="wikimapia" onclick="refresh()"
  101. value="http://www.wikimapia.org/#y=${lat}&x=${lon}&z=13&l=2&m=a&v=2"/>
  102. <label for="wikimapia">Wikimapia</label>
  103. <input type="radio" name="provider" id="rzr" onclick="refresh()"
  104. value="http://rzr.online.fr/geo/${lat},${lon}"/>
  105. <label for="rzr">Rzr</label>
  106. <input type="radio" name="provider" id="bing" onclick="refresh()"
  107. value="http://www.bing.com/maps/embed/?v=2&amp;cp=${lat}~${lon}&amp;lvl=5&amp;dir=0&amp;sty=r&amp;form=LMLTEW&amp;emid=bf64cbe7-ff5a-4400-4fdc-cf8e5e8e01e0"/>
  108. <label for="bing">Bing</label>
  109. <input type="radio" name="provider" id="flasheart" onclick="refresh()"
  110. value="http://www.flashearth.com/?&z=12.1&r=0&src=2&lat=${lat}&lon=${lon}"/>
  111. <label for="flasheart">Flashearth</label>
  112. -->
  113. -->
  114. Feature send image
  115. // TODO: check
  116. // var appControl = new tizen.ApplicationControl(
  117. // "http://tizen.org/appcontrol/operation/send", // compose or send
  118. // "mailto:", null, null,
  119. // [
  120. // new tizen.ApplicationControlData(
  121. // "http://tizen.org/appcontrol/data/subject", [ "Mapo" ]),
  122. // new tizen.ApplicationControlData(
  123. // "http://tizen.org/appcontrol/data/text", [ message ]),
  124. // new tizen.ApplicationControlData(
  125. // "http://tizen.org/appcontrol/data/to",
  126. // [ "mapo.tizen@gmail.com" ])
  127. //
  128. // // TODO tizen.mapo@spamgourmet.com
  129. // // new tizen.ApplicationControlData(
  130. // // "http://tizen.org/appcontrol/data/path",
  131. // // ["images/image1.jpg"])
  132. // ]);
  133. // tizen.application.launchAppControl(appControl, null,
  134. // function() {log("launch service succeeded");},
  135. // function(e) {
  136. // log("launch service failed. Reason: " + e.name);});
  137. TODO: feature send BT
  138. // TODO: check
  139. function sendBluetooth() {
  140. log("TODO");
  141. exit();
  142. var appControl = new tizen.ApplicationControl(
  143. "http://tizen.org/appcontrol/operation/bluetooth/pick", null,
  144. "image/jpeg", // "image/jpeg"
  145. null, []);
  146. tizen.application.launchAppControl(appControl, "tizen.bluetooth",
  147. function() {
  148. log("launch service succeeded");
  149. }, function(e) {
  150. handleError("launch service failed. Reason: " + e.name);
  151. });
  152. var appControlReplyCallback = {
  153. // // callee sent a reply
  154. onsuccess : function(data) {
  155. for (var i = 0; i < data.length; i++) {
  156. if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
  157. log('Selected image is ' + data[i].value[0]);
  158. }
  159. }
  160. },
  161. // callee returned failure
  162. onfailure : function() {
  163. log('The launch application control failed');
  164. }
  165. }
  166. tizen.application.launchAppControl(appControl, null, handleSucess,
  167. handleException, appControlReplyCallback);
  168. tizen.application.launch("tizen.bluetooth", function() {
  169. log("launch service succeeded");
  170. }, function(e) {
  171. log("launch service failed. Reason: " + e.name);
  172. });
  173. var appControl = new tizen.ApplicationControl(
  174. "http://tizen.org/appcontrol/operation/bluetooth/pick",
  175. "Phone/Images/image16.jpg");
  176. tizen.application.launchAppControl(appControl, null, function() {
  177. log("launch service succeeded");
  178. }, function(e) {
  179. log("launch service failed. Reason: " + e.name);
  180. });
  181. }