-
Notifications
You must be signed in to change notification settings - Fork 27
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
Introduce Overpass request #50
Conversation
src/data.js
Outdated
@@ -9,6 +9,8 @@ var jobsMarkers = {}; | |||
// Stored with vehicle id + {_start,_end} as key | |||
var vehiclesMarkers = {}; | |||
|
|||
var overpass = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could avoid storing the Overpass result if it's used directly in the ovepass.js
callback.
src/data.js
Outdated
@@ -18,5 +20,6 @@ module.exports = { | |||
maxVehicleId: maxVehicleId, | |||
vehicles: vehicles, | |||
jobsMarkers: jobsMarkers, | |||
vehiclesMarkers: vehiclesMarkers | |||
vehiclesMarkers: vehiclesMarkers, | |||
overpass: overpass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed if we use the Overpass result directly in the ovepass.js
callback.
@@ -175,6 +186,7 @@ var clearData = function() { | |||
data.vehicles = []; | |||
data.jobsMarkers = {}; | |||
data.vehiclesMarkers = {}; | |||
data.overpass = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed if we use the Overpass result directly in the ovepass.js
callback.
src/utils/data_handler.js
Outdated
var setOverpassOutput = function(output) { | ||
data.overpass = output; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed if we use the Overpass result directly in the ovepass.js
callback.
src/utils/data_handler.js
Outdated
var getOverpassOutput = function() { | ||
return data.overpass; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed if we use the Overpass result directly in the ovepass.js
callback.
src/utils/overpass.js
Outdated
dataHandler.setOverpassOutput(JSON.parse(xhttp.response)); | ||
applyResponse(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could move the body of applyResponse
here in order to use the Overpass result directly rather than storing it.
Thanks for submitting this PR! It fits really nicely into the existing code and really makes it much easier to use the demo. |
Related to issue #49