Skip to content

Instantly share code, notes, and snippets.

@LouisaKB
Created November 8, 2016 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save LouisaKB/b0b0280cb1e2977d330216b9a02d02c1 to your computer and use it in GitHub Desktop.
Save LouisaKB/b0b0280cb1e2977d330216b9a02d02c1 to your computer and use it in GitHub Desktop.
function timeFilterResponseHandler(responseText) {
var filteredPoi = filterByResponse(poi, responseText);
markerLayer.clearLayers();
drawMarker("blue")(origin);
var drawReachable = drawMarker("green");
filteredPoi.reachable.forEach(function (coords) {
drawReachable(coords);
});
var drawUnreachable = drawMarker("red");
filteredPoi.unreachable.forEach(function (coords) {
drawUnreachable(coords);
});
var timedPoi = getTimes(responseText);
displayTimes(timedPoi);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment