8000 Changes to be able to run on UVM silk server by ruuzia · Pull Request #1 · felixwalberg/UVM-Hackathon-Team-21 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Changes to be able to run on UVM silk server #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@
import requests
import json

app = Flask(__name__)
app = Flask(__name__, static_folder='public', static_url_path='')

GMT_VEHICLES_URL = "https://maps.trilliumtransit.com/gtfsmap-realtime/feed/ccta-vt-us/vehicles"
CAT_VEHICLES_URL = "https://feeds.transloc.com/3/vehicle_statuses?agencies=603&include_arrivals=true"
# Arrivals must be queried with individual stopcodes
GMT_ARRIVALS_URL = "https://maps.trilliumtransit.com/gtfsmap-realtime/feed/ccta-vt-us/arrivals?stopCode="
GMT_ROUTES_URL = "https://gtfs-api.trilliumtransit.com/gtfs-api/routes/by-feed/ccta-vt-us"
GMT_STOPS_URL = "https://gtfs-api.trilliumtransit.com/gtfs-api/stops/by-feed/ccta-vt-us/route-id/19137,19139,13496,13497,13498,3190,3191,7458,11182,7455,74419,74409,74410,74411,19141,74418,74413,3175,74412,3153,3176,3167,3177,3181,3168,3183,3197,3194,19140,3195,3196,3186,7335,74414,74415,3171,3172,3174,3188,74416,74417,3163,3164,3165,19138,32941,32942,11183,19143,19142,19144,19145,"
STOP_DATA = "static/routes.json"
STOP_DATA = "public/routes.json"

DAVIS_CENTER_GMT_STOPCODE = "805489"
UHEIGHT_STOPCODE = "805490"
MED_STOPCODE = "805757"


@app.route("/", methods=["GET"])
def home():
return render_template("map.html")
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion static/map.js → public/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ setInterval(() => {

setInterval(() => {
buses();
}, 1000)
}, 30*1000)
8 changes: 4 additions & 4 deletions static/routes.js → public/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreet

// Custom icons
var gmtbus = L.icon({
iconUrl: '../static/images/gmtbus.png',
iconUrl: '../images/gmtbus.png',
iconSize: [72, 80], // size of the icon
shadowSize: [50, 64], // size of the shadow
iconAnchor: [0, 20], // point of the icon which will correspond to marker's location
shadowAnchor: [4, 62], // the same for the shadow
popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAnchor
});
var catbus = L.icon({
iconUrl: '../static/images/catbus.png',
iconUrl: '../images/catbus.png',
iconSize: [90, 100], // size of the icon
shadowSize: [50, 64], // size of the shadow
iconAnchor: [0, 20], // point of the icon which will correspond to marker's location
shadowAnchor: [4, 62], // the same for the shadow
popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAnchor
});
var busStop = L.icon({
iconUrl: '../static/images/redcircle2.png',
iconUrl: '../images/redcircle2.png',
iconSize: [10, 10], // size of the icon
shadowSize: [50, 64], // size of the shadow
iconAnchor: [0, 8], // point of the icon which will correspond to marker's location
shadowAnchor: [4, 62], // the same for the shadow
popupAnchor: [0, 0] // point from which the popup should open relative to the iconAnchor
});
var busStop2 = L.icon({
iconUrl: '../static/images/bluecircle.png',
iconUrl: '../images/bluecircle.png',
iconSize: [10, 10], // size of the icon
shadowSize: [50, 64], // size of the shadow
iconAnchor: [0, 8], // point of the icon which will correspond to marker's location
Expand Down
File renamed without changes.
Loading
0