123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- Subject: mapo-notes
- ### NOTES ###
- Tizen Geolocation issue :
- https://developer.tizen.org/forums/native-application-development/device-gps-testing
- ### URLS ###
- Select maps source ie :
- https://maps.googleapis.com/maps/api/staticmap?center=0,0&sensor=false&size=512x512&zoom=5
- <select>
- <option value="http://www.openstreetmap.org/?&zoom=10&layers=B00FTF&lat={lat}&lon={lon}"
- >OpenStreetMap</option>
- <option value="http://maps.google.com/maps?&z={z}&ll=${icbm}">
- Google maps
- </option>
- <!--
- Rzr :
- url = http://rzr.online.fr/geo/${lat},${lon}
- OpenStreetMap :
- url = "http://www.openstreetmap.org/?&zoom=10&layers=mapnik&lat=${lat}&lon=${lon}"
- Wikimapia :
- url = http://www.wikimapia.org/#y=${lat}&x=${lon}&z=13&l=2&m=a&v=2
- $s = "http://www.wikimapia.org/#y=" . $la . "&x=" . $lo . "&z=13&l=2&m=a&v=2";
- printLink( $s , "Wikimapia" );
- Nokia :
- url = "http://maps.nokia.com/${lat},${lon},16,0,0,normal.day"
- $s = "http://maps.nokia.com/";
- $s= $s . $la . "," . $lo . ",16,0,0,normal.day";
- printLink( $s , "nokia" );
- Bing :
- url = "http://www.multimap.com/map/browse.cgi?&scale=5000&icon=x&lat=${lat}&lon=${lon}"
- $s = "http://www.bing.com/maps/?&lvl=20&sty=b&cp="; //48.128854~-1.638889"
- $s = $s . $la . "~" . $lo ;
- printLink( $s , "bing" );
- MultiMap :
- url = "http://www.multimap.com/map/browse.cgi?&scale=5000&icon=x&lat=${lat}&lon=${lon}"
- $s = "http://www.multimap.com/map/browse.cgi?&scale=5000&icon=x&lat=" . $la . "&lon=" . $lo ;
- printLink( $s , "Multimap" );
- Flick (Iframe not allowed) :
- url = "http://www.flickr.com/map?&fLat=48.0867&fLon=-1.5772&zl=10"
- $s = "http://www.flickr.com/map?&fLat=" . $la . "&fLon=" . $lo;
- printLink( $s , "Flickr" );
- GoogleMap :
- url = "http://maps.google.com/maps?&z=10&ll=${lat},${lon}"
- $s = "http://maps.google.com/maps?&z=" . $z . "&ll=" . $icbm ;
- printLink( $s , "Google" );
- Wiggle :
- url = "http://wigle.net/gps/gps/Map/onlinemap/?lat1=${lat}&lon1=${lon}"
- $s = "http://wigle.net/gps/gps/Map/onlinemap/?lat1=" . $la . "&lon1=" . $lo ;
- printLink( $s , "Wigle" );
- Geourl :
- url = "http://geourl.org/near?lat=${lat}&long=${lon}"
- $s = "http://geourl.org/near?lat=" . $la . "&long=" . $lo ;
- printLink( $s , "GeoURL" );
- Yahoo :
- url = "http://maps.yahoo.com/maps_result?&lat=${lat}&lon=${lon}"
- $s = "http://maps.yahoo.com/maps_result?&lat=" . $la . "&lon=" . $lo ;
- printLink( $s , "yahoo" );
- Frappr :
- url = "http://www.frappr.com/eracket&z=16&t=0&cx=${lat}&cy=${lon}"
- $s = "http://www.frappr.com/eracket&z=16&t=0&cx=" . $la . "&cy=" . $lo ;
- printLink( $s , "frappr");
- GamesWW7 :
- 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"
- $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";
- printLink( $s , "form");
- Flasheart :
- url = "http://www.flashearth.com/?&z=12.1&r=0&src=2&lat=${lat}&lon=${lon}"
- $s="http://www.flashearth.com/?&z=12.1&r=0&src=2&lat=" . $la . "&lon=" . $lo ;
- printLink( $s , "swf");
- InformationFreeway :
- url = "http://www.InformationFreeway.org/?&zoom=12&layers=0B00F000&lat=${lat}&lon=${lon}"
- $s="http://www.InformationFreeway.org/?" . "&zoom=12&layers=0B00F000" . "&lat=" . $la . "&lon=" . $lo ;
- printLink( $s , "way");
- if ( ! isset($icbm)) {
- if ( isset($geo)) { $icbm=$geo; }
- else if ( isset( $la) && isset($lo)) { $icbm="" . $la ."," . $lo; }
- }
- $la = preg_replace( '/(.*),.*/' , '$1' , $icbm );
- $lo = preg_replace( '/.*,(.*)/' , '$1' , $icbm );
- function decimalToAngle( $u )
- {
- $d = floor( $u );
- $s = ( $u - $d ) * 60. * 60.;
- $m = floor( $s / 60 );
- $s = floor( $s - 60 * $m );
- $t = "" . $d . "d" . $m . "m" . $s . "s";
- return $t;
- }
- function decimalToCoord( $lo , $la )
- {
- $t="";
- $t = $t . ( ( $lo < 0 ) ? "S" : "N" );
- if ( $lo < 0 ) { $lo = - ($lo) ; }
- $t = $t . decimalToAngle( $lo );
- $t = $t . ( ( $la < 0 ) ? "W" : "E" );
- if ( $la < 0 ) { $la=-($la);}
- $t = $t . decimalToAngle( $la );
-
- return $t;
- }
- $coord = decimalToCoord( $la , $lo );
-
- <!-- <input type="radio" name="provider" id="wikimapia" onclick="refresh()"
- value="http://www.wikimapia.org/#y=${lat}&x=${lon}&z=13&l=2&m=a&v=2"/>
- <label for="wikimapia">Wikimapia</label>
- <input type="radio" name="provider" id="rzr" onclick="refresh()"
- value="http://rzr.online.fr/geo/${lat},${lon}"/>
- <label for="rzr">Rzr</label>
- <input type="radio" name="provider" id="bing" onclick="refresh()"
- value="http://www.bing.com/maps/embed/?v=2&cp=${lat}~${lon}&lvl=5&dir=0&sty=r&form=LMLTEW&emid=bf64cbe7-ff5a-4400-4fdc-cf8e5e8e01e0"/>
- <label for="bing">Bing</label>
-
- <input type="radio" name="provider" id="flasheart" onclick="refresh()"
- value="http://www.flashearth.com/?&z=12.1&r=0&src=2&lat=${lat}&lon=${lon}"/>
- <label for="flasheart">Flashearth</label>
- -->
- -->
- Feature send image
- // TODO: check
- // var appControl = new tizen.ApplicationControl(
- // "http://tizen.org/appcontrol/operation/send", // compose or send
- // "mailto:", null, null,
- // [
- // new tizen.ApplicationControlData(
- // "http://tizen.org/appcontrol/data/subject", [ "Mapo" ]),
- // new tizen.ApplicationControlData(
- // "http://tizen.org/appcontrol/data/text", [ message ]),
- // new tizen.ApplicationControlData(
- // "http://tizen.org/appcontrol/data/to",
- // [ "mapo.tizen@gmail.com" ])
- //
- // // TODO tizen.mapo@spamgourmet.com
- // // new tizen.ApplicationControlData(
- // // "http://tizen.org/appcontrol/data/path",
- // // ["images/image1.jpg"])
- // ]);
- // tizen.application.launchAppControl(appControl, null,
- // function() {log("launch service succeeded");},
- // function(e) {
- // log("launch service failed. Reason: " + e.name);});
- TODO: feature send BT
- // TODO: check
- function sendBluetooth() {
- log("TODO");
- exit();
- var appControl = new tizen.ApplicationControl(
- "http://tizen.org/appcontrol/operation/bluetooth/pick", null,
- "image/jpeg", // "image/jpeg"
- null, []);
- tizen.application.launchAppControl(appControl, "tizen.bluetooth",
- function() {
- log("launch service succeeded");
- }, function(e) {
- handleError("launch service failed. Reason: " + e.name);
- });
- var appControlReplyCallback = {
- // // callee sent a reply
- onsuccess : function(data) {
- for (var i = 0; i < data.length; i++) {
- if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
- log('Selected image is ' + data[i].value[0]);
- }
- }
- },
- // callee returned failure
- onfailure : function() {
- log('The launch application control failed');
- }
- }
- tizen.application.launchAppControl(appControl, null, handleSucess,
- handleException, appControlReplyCallback);
- tizen.application.launch("tizen.bluetooth", function() {
- log("launch service succeeded");
- }, function(e) {
- log("launch service failed. Reason: " + e.name);
- });
- var appControl = new tizen.ApplicationControl(
- "http://tizen.org/appcontrol/operation/bluetooth/pick",
- "Phone/Images/image16.jpg");
- tizen.application.launchAppControl(appControl, null, function() {
- log("launch service succeeded");
- }, function(e) {
- log("launch service failed. Reason: " + e.name);
- });
- }
|