diff --git a/app/mydatabase.db b/app/mydatabase.db index 4a53692..22386b6 100644 Binary files a/app/mydatabase.db and b/app/mydatabase.db differ diff --git a/app/static/css/style.css b/app/static/css/style.css index a5ea33e..60b13a0 100755 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -63,8 +63,7 @@ audio{ } .locations_list .row div:last-of-type{ - width: 10%; - min-width: 3rem; + } .locations_list .row div{ diff --git a/app/templates/home.html b/app/templates/home.html index e039daf..8394523 100755 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -2,15 +2,15 @@ {% block main %}
-

GEO

+
- + {% endblock main %} {% block js %} @@ -40,13 +40,35 @@ // }).addTo(map); locations.forEach(function (item, index) { + try { - var circle = L.circle([item.latitude, item.longitude], { - color: 'red', - fillColor: 'red', - fillOpacity: 1, - radius: 30 - }).addTo(map); + if(item.loc_type=="message"){ + var circle = L.circle([item.latitude, item.longitude], { + color: 'blue', + stroke:false, + fillColor: 'blue', + fillOpacity: 1, + radius: 15 + }).addTo(map).on("click", circleClick);; + } + else if(item.loc_type=="audio"){ + var circle = L.circle([item.latitude, item.longitude], { + color: 'green', + stroke:false, + fillColor: 'green', + fillOpacity: 0.5, + radius: 15 + }).addTo(map).on("click", circleClick);; + } + else{ + var circle = L.circle([item.latitude, item.longitude], { + color: 'black', + stroke:false, + fillColor: 'black', + fillOpacity: 0.5, + radius: 30 + }).addTo(map).on("click", circleClick);; + } } catch (error) { console.error(error); } @@ -55,9 +77,10 @@ }); var myPositionCircle = L.circle([48.172934, 9.01236], { - color: 'black', - fillColor: 'black', - fillOpacity: 1, + color: 'red', + stroke:false, + fillColor: 'red', + fillOpacity: 0.5, radius: 30 }).addTo(map); diff --git a/app/views.py b/app/views.py index 326da1d..369f3bd 100755 --- a/app/views.py +++ b/app/views.py @@ -65,8 +65,6 @@ def list_locations(): return render_template('list.html',domain=DOMAIN, locations = locations, data_locations = serialized) - - @app.route('/hello/') def hello(name): return "Hello " + name