diff --git a/static/ShowMeYourBigSatellite.sublime-project b/ShowMeYourBigSatellite.sublime-project similarity index 100% rename from static/ShowMeYourBigSatellite.sublime-project rename to ShowMeYourBigSatellite.sublime-project diff --git a/static/ShowMeYourBigSatellite.sublime-workspace b/ShowMeYourBigSatellite.sublime-workspace similarity index 98% rename from static/ShowMeYourBigSatellite.sublime-workspace rename to ShowMeYourBigSatellite.sublime-workspace index a8c9053..ef43c0c 100644 --- a/static/ShowMeYourBigSatellite.sublime-workspace +++ b/ShowMeYourBigSatellite.sublime-workspace @@ -3,6 +3,10 @@ { "selected_items": [ + [ + "center", + "centerStart" + ], [ "m", "mainCoord" @@ -532,6 +536,9 @@ }, "file_history": [ + "/home/jll/Documents/01_perso/14_ShowMeYourBigSatellite/.git/COMMIT_EDITMSG", + "/home/jll/Documents/01_perso/14_ShowMeYourBigSatellite/main.py", + "/home/jll/Documents/01_perso/14_ShowMeYourBigSatellite/.gitignore", "/home/jll/dev/source/main/spacemetric/keystoneapi/build.xml", "/home/jll/dev/source/main/spacemetric/build.xml", "/home/jll/dev/source/main/products/keystone/build.xml", @@ -656,10 +663,7 @@ "/home/jll/dev/source_git/main_zwolle/csd/db/build.properties", "/opt/spacemetric/keystone/config/keystone.postgres", "/home/jll/Desktop/WEB-INF/web.xml", - "/home/jll/Documents/01_perso/19_jenkinsArduinoNotification/arduino/blink/Blink/Blink.ino", - "/home/jll/Documents/01_perso/18_blog/assets/fonts/icomoon.eot", - "/home/jll/Documents/01_perso/18_blog/assets/css/main.min.css", - "/home/jll/Documents/01_perso/18_blog/_posts/2012-08-31-ivolution-development-status-35.markdown" + "/home/jll/Documents/01_perso/19_jenkinsArduinoNotification/arduino/blink/Blink/Blink.ino" ], "find": { @@ -873,7 +877,7 @@ "cols": [ 0.0, - 0.578905221254, + 0.469688049537, 1.0 ], "rows": diff --git a/static/js/lib/images/layers-2x.png b/static/js/lib/images/layers-2x.png new file mode 100644 index 0000000..a2cf7f9 Binary files /dev/null and b/static/js/lib/images/layers-2x.png differ diff --git a/static/js/lib/images/layers.png b/static/js/lib/images/layers.png new file mode 100644 index 0000000..bca0a0e Binary files /dev/null and b/static/js/lib/images/layers.png differ diff --git a/static/js/lib/images/marker-icon-2x.png b/static/js/lib/images/marker-icon-2x.png new file mode 100644 index 0000000..0015b64 Binary files /dev/null and b/static/js/lib/images/marker-icon-2x.png differ diff --git a/static/js/lib/images/marker-icon.png b/static/js/lib/images/marker-icon.png new file mode 100644 index 0000000..e2e9f75 Binary files /dev/null and b/static/js/lib/images/marker-icon.png differ diff --git a/static/js/lib/images/marker-shadow.png b/static/js/lib/images/marker-shadow.png new file mode 100644 index 0000000..d1e773c Binary files /dev/null and b/static/js/lib/images/marker-shadow.png differ diff --git a/static/js/mapsFun.js b/static/js/mapsFun.js index 18ef3a3..786ad70 100644 --- a/static/js/mapsFun.js +++ b/static/js/mapsFun.js @@ -2,31 +2,36 @@ var map; var satMarker; var myLatLng; -function initializeGoogle() { +function initializeMap() { - var centerStart = new google.maps.LatLng(60, 16); + var centerStart = new L.latLng(60, 16); var mapOptions = { zoom: 6, - center: centerStart, - mapTypeId: google.maps.MapTypeId.ROADMAP - } + center: centerStart + }; - map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); + map = new L.map('map', mapOptions); + + // adds an OpenStreetMap tile layer + var tileLayer = L.tileLayer('http://{s}.tiles.mapbox.com/v3/jlengrand.j49bad4d/{z}/{x}/{y}.png'); + + map.addLayer(tileLayer); var image = 'images/satellite_64.png'; - satMarker = new google.maps.Marker({ - position: centerStart, - map: map, - icon: image - }); + satMarker = new L.Marker(centerStart); + satMarker.addTo(map); + //TODO: Custom marker + + }; // Gets the latest satellite position from the server function getPosition(){ $.getJSON("http://localhost:5000/get_coordinates",function(result){ - var pos = new google.maps.LatLng(result.latitude, result.longitude); - satMarker.setPosition(pos); + var pos = new L.latLng(result.latitude, result.longitude); + satMarker.setLatLng(pos); + //FIXME: change }); } @@ -40,7 +45,7 @@ function loopPosition(intervalSec){ // Load the application once the DOM is ready, using `jQuery.ready`: $(function(){ // Inits the map and the marker - initializeGoogle(); + initializeMap(); //Starts looping over the positions loopPosition(1); diff --git a/static/simplemap.html b/static/simplemap.html index 9bbffaa..5c5d3fe 100644 --- a/static/simplemap.html +++ b/static/simplemap.html @@ -5,7 +5,7 @@