Skip to content

Commit

Permalink
Merge pull request #278 from GIScience/release-v0.3.8
Browse files Browse the repository at this point in the history
Release v0.3.8
  • Loading branch information
TheGreatRefrigerator authored Feb 28, 2019
2 parents 843df4a + 8ba42c6 commit e8cb939
Show file tree
Hide file tree
Showing 38 changed files with 2,255 additions and 1,341 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
### Fixed
### Changed
### Deprecated-->
### Deprecated
### Removed-->


## [v0.3.8] - 2019-02-28

### Added
- OpenFuelService integration ([#248](https://github.com/GIScience/openrouteservice-app/issues/248))

### Removed
- cycling-tour profile ([#272](https://github.com/GIScience/openrouteservice-app/issues/272))
- some options see ORS issue [#396](https://github.com/GIScience/openrouteservice/issues/396) ([#274](https://github.com/GIScience/openrouteservice-app/issues/274))

## [v0.3.7] - 2018-12-17

Expand Down
4 changes: 3 additions & 1 deletion app/components/ors-header/ors-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ angular.module("orsApp.ors-header", []).component("orsHeader", {
ENV.geocode = ctrl.currentOptions.env.geocode;
ENV.matrix = ctrl.currentOptions.env.matrix;
ENV.pois = ctrl.currentOptions.env.pois;
ENV.fuel = ctrl.currentOptions.env.fuel;
};
/**
* Informs the user about changed Endpoints
Expand All @@ -107,7 +108,8 @@ geocode: ${ENV.geocode}
directions: ${ENV.directions}
isochrones: ${ENV.isochrones}
matrix: ${ENV.matrix}
pois: ${ENV.pois}`);
pois: ${ENV.pois}
fuel: ${ENV.fuel}`);
};
/**
* Save Endpoints to cookies
Expand Down
12 changes: 6 additions & 6 deletions app/components/ors-map/ors-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,8 @@ angular.module("orsApp").directive("orsMap", () => {
orsCookiesFactory.getMapOptions() &&
orsCookiesFactory.getMapOptions().msi
? orsCookiesFactory.getMapOptions().msi
: 3;
// override cookies if mapsurfer in cookies
if ($scope.mapStyleId === 0) {
$scope.mapStyleId = 3;
}
: 0;

// mapOptionsInitSubject is a replay subject and only subscribes once
let mapInitSubject = orsSettingsFactory.mapOptionsInitSubject.subscribe(
settings => {
Expand Down Expand Up @@ -472,6 +469,7 @@ angular.module("orsApp").directive("orsMap", () => {
// add mapstyle
angular.forEach($scope.baseLayers, (value, key) => {
if (value.options.id == $scope.mapStyleId) {
console.log($scope.mapStyleId, $scope.baseLayers);
$scope.baseLayers[key].addTo($scope.orsMap);
}
});
Expand Down Expand Up @@ -1969,13 +1967,15 @@ angular.module("orsApp").directive("orsPopup", [
"orsUtilsService",
"orsRequestService",
"orsRouteService",
"orsFuelService",
(
$compile,
$timeout,
orsSettingsFactory,
orsUtilsService,
orsRequestService,
orsRouteService
orsRouteService,
orsFuelService
) => {
return {
restrict: "E",
Expand Down
2 changes: 1 addition & 1 deletion app/components/ors-navigation/ors-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ angular
if ($location.path() == "/") {
ctrl.activeMenu = "/directions";
} else ctrl.activeMenu = $location.path();
ctrl.version = "0.3.7";
ctrl.version = "0.3.8";
}
],
$routeConfig: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@ angular.module("orsApp.ors-aa-waypoint", []).component("orsAaWaypoint", {
ctrl.showGeocodingPanel = !ctrl.showGeocodingPanel;
};
// ctrl.$doCheck = () => {
// console.log('check');
// }
// ctrl.$onChanges = (changesObj) => {
// // can be different kinds of changes
// if (changesObj.idx) {
// console.log(changesObj.idx);
// console.log(ctrl.waypoints);
// // if array is reversed, 5 changes, how to unify???
// }
// };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ angular
};
// subscribes to changes in waypoints, this doesnt have to be added though, why?
// orsSettingsFactory.subscribeToAaWaypoints(function onNext(d) {
// console.log('waypoints updated!!! panel', d);
// ctrl.waypoints = d;
// });
ctrl.collapsed = false;
Expand Down Expand Up @@ -71,7 +70,6 @@ angular
};
ctrl.$doCheck = () => {
// check if array has changed
//console.log('update route');
};
ctrl.waypointsChanged = () => {};
ctrl.resetWaypoints = () => {
Expand Down
43 changes: 43 additions & 0 deletions app/components/ors-panel-routing/ors-summary/ors-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,49 @@
</div>
<div class="bottom-border">
</div>
<div class="options-box" ng-if="route.summary.ofs">
<div class="margin-bottom-6" ng-click="showFuelInfo = !showFuelInfo" ng-init="showFuelInfo = true;">
<span>
<i ng-class="$ctrl.getClass(showFuelInfo)">
</i>
</span>
<span ng-bind-html="('FUEL_CONSUMPTION' | translate)">
</span>
</div>
<div style="color: grey; font-style: italic" ng-if="showFuelInfo" ng-bind-html="('_FOR' | translate) + ' ' + route.summary.ofs.request_id + ':'"></div>
<br>
<div ng-repeat="(vehicleClass, info) in route.summary.ofs['fuel_stats']" ng-if="showFuelInfo">
<div ng-if="$ctrl.classInQuery(route.summary.ofs, vehicleClass) || (vehicleClass==='individual' && $first)">
<div ng-if="info['category_info']['calculation_errors'] !== 'No Errors'">
<div>Not enough data to calculate category {{$ctrl.carCategories[vehicleClass].en}}</div>
</div>
<div ng-if="info['category_info']['calculation_errors'] === 'No Errors'">
<div ng-if="heading !== 'route'" ng-repeat="(heading, content) in info">
<table class="ui celled teal compact small table">
<thead>
<tr>
<th ng-bind-html="heading.split('_').join(' ') | capitalize"></th><th></th>
</tr>
</thead>
<tbody align="right">
<tr ng-repeat="(key,value) in content">
<td class="entry" ng-bind-html="key.split('_').join(' ').replace('per','/')"></td>
<td class="entry">{{value}}</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
</div>
</div>
<div ng-if="route.summary.ofs['attributions'] && showFuelInfo" style="color: grey; font-style: italic">
<div >Attributions:</div>
<div ng-repeat="source in route.summary.ofs['attributions']">{{source}}</div>
</div>
</div>
<div class="bottom-border">
</div>
</li>
</ul>
</div>
Expand Down
8 changes: 7 additions & 1 deletion app/components/ors-panel-routing/ors-summary/ors-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ angular
"orsObjectsFactory",
"orsRouteService",
"lists",
"carCategories",
function(
$rootScope,
orsSettingsFactory,
orsMapFactory,
orsObjectsFactory,
orsRouteService,
lists
lists,
carCategories
) {
let ctrl = this;
ctrl.carCategories = carCategories;
ctrl.checkboxes = [false, false, false, false];
ctrl.showShare = false;
ctrl.showExport = false;
Expand Down Expand Up @@ -78,6 +81,9 @@ angular
ctrl.DeEmphRoute = () => {
orsRouteService.DeEmph();
};
ctrl.classInQuery = (ofsData, vehicleClass) => {
return ofsData.general.vehicle_categories.indexOf(vehicleClass) > -1;
};
}
]
});
Loading

0 comments on commit e8cb939

Please sign in to comment.