Skip to content

Commit

Permalink
Merge pull request #329 from GIScience/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
TheGreatRefrigerator authored Mar 26, 2020
2 parents 2f6122a + 478ecad commit 9286306
Show file tree
Hide file tree
Showing 41 changed files with 1,108 additions and 172 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Deprecated
### Removed-->

## [v0.4.3] - 2020-03-26

### Added
- deviation tolerance during route import ([#325](https://github.com/GIScience/openrouteservice-app/issues/325))
- set lower value for more waypoints/accuracy
- alternative route feature ([#319](https://github.com/GIScience/openrouteservice-app/issues/319))
- activate in settings, click route or sidebar entry to switch route
- only for routes with 2 points (start & end) below 100km
- default values for `weight-factor` and `share-factor` used
- possibility to mock the ors response for development purpose
- uncomment all instances of "mock" to enable

### Fixed
- no extra info settings for subgroups ([#328](https://github.com/GIScience/openrouteservice-app/issues/328))

### Changed
- maxZoom of all base maps to 18 ([#311](https://github.com/GIScience/openrouteservice-app/issues/311))
- route processing logic to increase performance ([#320](https://github.com/GIScience/openrouteservice-app/issues/320))

## [v0.4.2] - 2020-01-30

### Added
Expand Down
30 changes: 20 additions & 10 deletions app/components/ors-header/ors-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ angular.module("orsApp.ors-header", []).component("orsHeader", {
// ctrl.showSettings = ctrl.showDev = ctrl.editEndpoints = true;

/* initialize endpoint urls from cookies */
ctrl.currentOptions.env = orsCookiesFactory.getCookies().env;
let cookies = orsCookiesFactory.getCookies();
ctrl.currentOptions.env = cookies.env;
ctrl.currentOptions.alternativeRoutes = cookies.alternativeRoutes; //TODO set from cookies/permalink
ctrl.setENV();
ctrl.envBase = ctrl.currentOptions.env.directions
.split("/")
Expand All @@ -38,8 +40,12 @@ angular.module("orsApp.ors-header", []).component("orsHeader", {
waytype: true,
surface: true
};
ctrl.saveENV = false;
ctrl.lists_extra_info = lists.extra_info;
ctrl.getActiveProfile = orsSettingsFactory.getActiveProfile;
ctrl.getActiveSubGroup = () => {
return lists.profiles[ctrl.getActiveProfile().type].subgroup;
};
ctrl.optionList = lists.userOptions;
ctrl.changeExtras();
};
Expand Down Expand Up @@ -97,12 +103,16 @@ angular.module("orsApp.ors-header", []).component("orsHeader", {
* Writes the endpoint settings to app/js/config.js to take immediate effect
*/
ctrl.setENV = () => {
ENV.directions = ctrl.currentOptions.env.directions;
ENV.isochrones = ctrl.currentOptions.env.isochrones;
ENV.geocode = ctrl.currentOptions.env.geocode;
ENV.matrix = ctrl.currentOptions.env.matrix;
ENV.pois = ctrl.currentOptions.env.pois;
ENV.fuel = ctrl.currentOptions.env.fuel;
for (let ep of [
"directions",
"isochrones",
"geocode",
"matrix",
"pois",
"fuel"
]) {
ENV[ep] = ctrl.currentOptions.env[ep];
}
};
/**
* Informs the user about changed Endpoints
Expand All @@ -120,7 +130,7 @@ fuel: ${ENV.fuel}`);
* Save Endpoints to cookies
*/
ctrl.saveEndpoints = () => {
if (ctrl.saveCookies)
if (ctrl.saveENV)
orsCookiesFactory.setCookieUserOptions(ctrl.currentOptions);
};
/**
Expand All @@ -132,7 +142,7 @@ fuel: ${ENV.fuel}`);
.split("/")
.slice(0, 3)
.join("/");
if (ctrl.saveCookies)
if (ctrl.saveENV)
orsCookiesFactory.setCookieUserOptions(ctrl.currentOptions);
};

Expand All @@ -155,7 +165,7 @@ fuel: ${ENV.fuel}`);
$translate.use(ctrl.currentOptions.language);
orsSettingsFactory.setUserOptions(ctrl.currentOptions);
// if endpoints should not be saved to cookies pass current options without them
if (!ctrl.saveCookies) {
if (!ctrl.saveENV) {
let withoutEnv = JSON.parse(JSON.stringify(ctrl.currentOptions));
delete withoutEnv.env;
orsCookiesFactory.setCookieUserOptions(withoutEnv);
Expand Down
Loading

0 comments on commit 9286306

Please sign in to comment.