Skip to content
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

Refactor direction engines and unify structure #5621

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hlfan
Copy link
Contributor

@hlfan hlfan commented Feb 5, 2025

Untangling FOSSGISOSRMEngine and moving from pushing for loops to .map() for the other engines.

Description

The three routing engines' code now follows a similar structure:

function ...Engine (id, ...) {
  function _processDirections(...) {...}

  return {
    ...,
    getRoute: function (points, callback) {
      data = {...};
      return $.ajax({
        ...,
        success: function // that calls the callback with _processDirections
      });
    }
  };
};

How has this been tested?

Creating a conditional dev tools breakpoint and shoving it all in there.

@github-actions github-actions bot added the big-pr label Feb 5, 2025
@hlfan hlfan force-pushed the unify-direction-engines-structure branch from 0f20bf9 to a56c74c Compare February 5, 2025 19:37
@hlfan hlfan force-pushed the unify-direction-engines-structure branch from a56c74c to 3528239 Compare February 6, 2025 07:13
@github-actions github-actions bot removed the big-pr label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant