Navigation.html receives the end parameter as a user input. This needs to be used as dest before roll_trip(): is run. Then the place information needs to be returned to the empty list viewpoints = [] to construct the route.
The issue:
The python function needs to receive end before running
The python function can't be run itself in the midst of this already running JavaScript function
The routeCalculate function needs to receive the place data before fully running in order to plot the route
TrippRoller can't run inside the existing JS because this is a website, it would expose the API key and this needs to be kept secure
The proposal to mitigate this is:
User inputs their starting and destination address
Run the roll_trip() function separately off of the cloud via a simple Flask web API, with the gkey safely within FireBase
Pass the necessary input data via the API to the roll function and run it
Pass the necessary output data back to route calculation
Navigation.html receives the
end
parameter as a user input. This needs to be used asdest
beforeroll_trip():
is run. Then the place information needs to be returned to the empty listviewpoints = []
to construct the route.The issue:
end
before runningThe proposal to mitigate this is:
roll_trip()
function separately off of the cloud via a simple Flask web API, with the gkey safely within FireBaseSimple diagram:
A basic overview of running requests over Flask (under "Accessing Request Data")