Merge pull request #17 from jlengrand/isue_16

Issue 16
This commit is contained in:
julien Lengrand-Lambert
2014-08-05 23:55:59 +02:00
3 changed files with 12 additions and 5 deletions

View File

@@ -537,6 +537,8 @@
},
"file_history":
[
"/home/jll/Documents/01_perso/10_whereShouldILive/index.html",
"/home/jll/Documents/01_perso/14_ShowMeYourBigSatellite/whereismysat.py",
"/home/jll/Documents/01_perso/14_ShowMeYourBigSatellite/.git/COMMIT_EDITMSG",
"/home/jll/Documents/01_perso/14_ShowMeYourBigSatellite/templates/dropdown_test.html",
"/home/jll/Documents/01_perso/14_ShowMeYourBigSatellite/main.py",
@@ -662,9 +664,7 @@
"/home/jll/dev/source_git/main_zwolle/majiic/db/build.properties",
"/home/jll/dev/source_git/main_zwolle/csd/db/build.xml",
"/home/jll/dev/source_git/main_zwolle/csd/build.properties",
"/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/dev/source_git/main_zwolle/csd/db/build.properties"
],
"find":
{

View File

@@ -33,10 +33,10 @@ var satelliteIcon = L.icon({
// Gets the latest satellite position from the server
function getPosition(){
var urlBase = "http://localhost:5000/get_coordinates/"
var urlBase = $("#server").val() + "/get_coordinates/";
var satellite = $("#satellite").val();
var url = urlBase + satellite;
console.log(url);
$.getJSON(url,function(result){
var pos = new L.latLng(result.latitude, result.longitude);
satMarker.setLatLng(pos);

View File

@@ -13,6 +13,7 @@
<div id="map"></div>
<div id="menu">
<h1>Menu<h1>
<div id="satellites">
<h2>Select your satellite : <h2>
<select id="satellite">
{% for sat in satellites %}
@@ -20,6 +21,12 @@
{% endfor %}
</select>
</div>
<div id="servers">
<h2>Server address : <h2>
<input type="text" id="server" value="http://localhost:5000">
</div>
</div>
</body>
<script src='js/lib/leaflet.js'></script>