From fd3564f1f71770eb4c9fd88dc346937f4aed38bc Mon Sep 17 00:00:00 2001 From: Alexander Roidl Date: Thu, 10 Nov 2022 10:20:25 +0100 Subject: [PATCH] minor changes to home --- app/mydatabase.db | Bin 8192 -> 8192 bytes app/static/css/style.css | 3 +-- app/templates/home.html | 45 +++++++++++++++++++++++++++++---------- app/views.py | 2 -- 4 files changed, 35 insertions(+), 15 deletions(-) diff --git a/app/mydatabase.db b/app/mydatabase.db index 4a536929738b22597da8ddd9c39abeb734e71873..22386b6f8ef07c20ce1a4462744240326255d4a7 100644 GIT binary patch delta 131 zcmZp0XmFSy&6qGz#+fl;W5N=CF;3pUOni6w*75uDALH-lE9SG{{mU;fSwTQ!vVj2G zW)Fc~e4c{r?9!^d4hnt73m;ZGS_-o>u(ONvx&sA-e+RHVaPauQS;|}EaAIjnX1-;- gp_!S5fuVtciKU*Afr*i+Sv*)mFSo#WvbX$J0N1o8&j0`b delta 131 zcmZp0XmFSy%@{vX#+fmGW5N=CF%I6pOni6w*75uDALH-lE9SG{{mc7zvVwrdWCH=V z%^m`~_&j~s*`-x^9TfVE7e1_Xbny7Uyz;;`)7;eJ;>7gS#Nw1R80N2GPynjs1*z2y W+b?n!sCL;@y?KdHwUfQ&w*mkzQ7y3m 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