Skip to content

Commit

Permalink
Merge pull request #181 from GIScience/release-0.1.2
Browse files Browse the repository at this point in the history
Release 0.1.2
  • Loading branch information
TimMcCauley authored Feb 14, 2018
2 parents eb710c6 + 450475f commit 1537884
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ build/
.tmp/
app/css/
Gruntfile.js
.idea/
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.1.1] - 2017-10-12
## [0.1.2] - 2018-02-13

### Fixed
- Pass empty options object to route request (https://github.com/GIScience/openrouteservice-app/issues/180)

## [0.1.1] - 2018-02-07

### Added
- Build instructions
Expand Down
27 changes: 20 additions & 7 deletions app/infrastructure/ors-utils-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,25 @@ angular.module('orsApp.utils-service', [])
options.avoid_features = options.avoid_features.slice(0, -1);
}
if (subgroup == 'HeavyVehicle') {
options.vehicle_type = settings.profile.type;
if (!angular.isUndefined(settings.profile.options.width)) options.profile_params.restrictions.width = settings.profile.options.width.toString();
if (!angular.isUndefined(settings.profile.options.height)) options.profile_params.restrictions.height = settings.profile.options.height.toString();
if (!angular.isUndefined(settings.profile.options.hgvWeight)) options.profile_params.restrictions.weight = settings.profile.options.hgvWeight.toString();
if (!angular.isUndefined(settings.profile.options.length)) options.profile_params.restrictions.length = settings.profile.options.length.toString();
if (!angular.isUndefined(settings.profile.options.axleload)) options.profile_params.restrictions.axleload = settings.profile.options.axleload.toString();
if (!angular.isUndefined(settings.profile.options.hazmat)) options.profile_params.restrictions.hazmat = settings.profile.options.hazmat;
let vt = 0;
if (!angular.isUndefined(settings.profile.options.width)) {
options.profile_params.restrictions.width = settings.profile.options.width.toString(); ++vt;
}
if (!angular.isUndefined(settings.profile.options.height)) {
options.profile_params.restrictions.height = settings.profile.options.height.toString(); ++vt;
}
if (!angular.isUndefined(settings.profile.options.hgvWeight)) {
options.profile_params.restrictions.weight = settings.profile.options.hgvWeight.toString(); ++vt;
}
if (!angular.isUndefined(settings.profile.options.length)) {
options.profile_params.restrictions.length = settings.profile.options.length.toString(); ++vt;
}
if (!angular.isUndefined(settings.profile.options.axleload)) {
options.profile_params.restrictions.axleload = settings.profile.options.axleload.toString(); ++vt;
}
if (!angular.isUndefined(settings.profile.options.hazmat)) {options.profile_params.restrictions.hazmat = settings.profile.options.hazmat; ++vt;
}
if (vt != 0) options.vehicle_type = settings.profile.type;
}
if (settings.profile.options.maxspeed) options.maximum_speed = settings.profile.options.maxspeed.toString();
if (subgroup == 'Bicycle') {
Expand Down Expand Up @@ -299,6 +311,7 @@ angular.module('orsApp.utils-service', [])
}
if (angular.equals(options.profile_params.weightings, {})) delete options.profile_params.weightings;
if (angular.equals(options.profile_params.restrictions, {})) delete options.profile_params.restrictions;
if (angular.equals(options.profile_params, {})) delete options.profile_params;
return options;
};
/**
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openrouteservice.org",
"description": "angular version of openrouteservice.org",
"version": "0.1.1",
"version": "0.1.2",
"homepage": "http://www.uni-heidelberg.de",
"license": "MIT",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maps.openrouteservice.org",
"version": "0.1.1",
"version": "0.1.2",
"scripts": {
"start": "npm run lite",
"lite": "lite-server"
Expand Down

0 comments on commit 1537884

Please sign in to comment.