Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
abenrob committed Feb 8, 2018
2 parents b80fa50 + 4425ed3 commit fec06fa
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 151 deletions.
126 changes: 0 additions & 126 deletions Gruntfile.js

This file was deleted.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ A demonstration of the library's features, as well as detailed coding examples c
![Route360](r360.png)


# Build
`npm run build`

# Npm
You can use our project with npm

Expand Down
31 changes: 22 additions & 9 deletions dist/r360-src.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
Route360° JavaScript API v0.4.3 (661aa02), a JS library for leaflet maps. http://route360.net
Route360° JavaScript API v0.5.0 (8d15b49), a JS library for leaflet maps. http://route360.net
(c) 2017 Henning Hollburg, Daniel Gerber and Jan Silbersiepe, (c) 2017 Motion Intelligence GmbH
*/
(function (window, document, undefined) {
var r360 = {
version : 'v0.4.3',
version : 'v0.5.0',

// Is a given variable undefined?
isUndefined : function(obj) {
Expand Down Expand Up @@ -1730,6 +1730,8 @@ r360.TravelOptions = function(){
this.serviceUrl = undefined;
this.serviceKey = undefined;

this.travelTimeFactors = undefined;

this.getReverse = function(){ return this.reverse; }
this.setReverse = function(reverse){ this.reverse = reverse; }

Expand Down Expand Up @@ -2279,6 +2281,14 @@ r360.TravelOptions = function(){
this.setEdgeWeight = function(edgeWeight){
this.edgeWeight = edgeWeight;
}

this.getTravelTimeFactors = function(){
return this.travelTimeFactors;
}

this.setTravelTimeFactors = function(travelTimeFactors){
this.travelTimeFactors = travelTimeFactors;
}
};

r360.travelOptions = function () {
Expand All @@ -2297,9 +2307,10 @@ r360.PolygonService = {
var cfg = {};
cfg.sources = [];

if ( !r360.isUndefined(travelOptions.isElevationEnabled()) ) cfg.elevation = travelOptions.isElevationEnabled();
if ( !r360.isUndefined(travelOptions.getReverse()) ) cfg.reverse = travelOptions.getReverse();
if ( !r360.isUndefined(travelOptions.getEdgeWeight()) ) cfg.edgeWeight = travelOptions.getEdgeWeight();
if ( !r360.isUndefined(travelOptions.isElevationEnabled()) ) cfg.elevation = travelOptions.isElevationEnabled();
if ( !r360.isUndefined(travelOptions.getReverse()) ) cfg.reverse = travelOptions.getReverse();
if ( !r360.isUndefined(travelOptions.getEdgeWeight()) ) cfg.edgeWeight = travelOptions.getEdgeWeight();
if ( !r360.isUndefined(travelOptions.getTravelTimeFactors()) ) cfg.travelTimeFactors = travelOptions.getTravelTimeFactors();

cfg.polygon = {};

Expand All @@ -2311,7 +2322,7 @@ r360.PolygonService = {
if ( !r360.isUndefined(travelOptions.getSrid()) ) cfg.polygon.srid = travelOptions.getSrid();
if ( !r360.isUndefined(travelOptions.getSimplifyMeter()) ) cfg.polygon.simplify = travelOptions.getSimplifyMeter();
if ( !r360.isUndefined(travelOptions.getBuffer()) ) cfg.polygon.buffer = travelOptions.getBuffer();
if ( !r360.isUndefined(travelOptions.getQuadrantSegments()) ) cfg.polygon.quadrantSegments = travelOptions.getQuadrantSegments();
if ( !r360.isUndefined(travelOptions.getQuadrantSegments()) ) cfg.polygon.quadrantSegments = travelOptions.getQuadrantSegments();

// add each source point and it's travel configuration to the cfg
travelOptions.getSources().forEach(function(source){
Expand Down Expand Up @@ -2463,8 +2474,9 @@ r360.RouteService = {

var cfg = { sources : [], targets : [], pathSerializer : travelOptions.getPathSerializer() };

if ( !r360.isUndefined(travelOptions.isElevationEnabled()) ) cfg.elevation = travelOptions.isElevationEnabled();
if ( !r360.isUndefined(travelOptions.getReverse()) ) cfg.reverse = travelOptions.getReverse();
if ( !r360.isUndefined(travelOptions.isElevationEnabled()) ) cfg.elevation = travelOptions.isElevationEnabled();
if ( !r360.isUndefined(travelOptions.getReverse()) ) cfg.reverse = travelOptions.getReverse();
if ( !r360.isUndefined(travelOptions.getTravelTimeFactors()) ) cfg.travelTimeFactors = travelOptions.getTravelTimeFactors();

travelOptions.getSources().forEach(function(source){

Expand Down Expand Up @@ -2602,7 +2614,8 @@ r360.TimeService = {
maxRoutingLength : travelOptions.getMaxRoutingLength()
};

if ( !r360.isUndefined(travelOptions.isElevationEnabled()) ) cfg.elevation = travelOptions.isElevationEnabled();
if ( !r360.isUndefined(travelOptions.isElevationEnabled()) ) cfg.elevation = travelOptions.isElevationEnabled();
if ( !r360.isUndefined(travelOptions.getTravelTimeFactors()) ) cfg.travelTimeFactors = travelOptions.getTravelTimeFactors();
if ( !r360.isUndefined(travelOptions.getTravelTimes()) || !r360.isUndefined(travelOptions.getIntersectionMode()) ) {

cfg.polygon = {};
Expand Down
8 changes: 4 additions & 4 deletions dist/r360.js

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "route360",
"version": "0.4.3",
"version": "0.5.0",
"description": "The Route360° JavaScript API for Motion Intelligence's time-based access mapping service.",
"main": "dist/r360.js",
"directories": {
"test": "test"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "jake build"
},
"repository": {
"type": "git",
Expand All @@ -24,5 +25,10 @@
"bugs": {
"url": "https://github.com/route360/r360-js/issues"
},
"homepage": "https://developers.route360.net"
"homepage": "https://developers.route360.net",
"devDependencies": {
"jake": "^8.0.15",
"jshint": "^2.9.5",
"uglify-js": "~2.7.5"
}
}
2 changes: 1 addition & 1 deletion src/copyright.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
Route360° JavaScript API {VERSION}, a JS library for leaflet maps. http://route360.net
Route360° JavaScript API {VERSION}, a JS library for leaflet.js and google maps API. http://route360.net
(c) 2017 Henning Hollburg, Daniel Gerber and Jan Silbersiepe, (c) 2017 Motion Intelligence GmbH
*/
2 changes: 1 addition & 1 deletion src/r360.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

var r360 = {
version : 'v0.4.3',
version : 'v0.5.0',

// Is a given variable undefined?
isUndefined : function(obj) {
Expand Down
9 changes: 5 additions & 4 deletions src/rest/polygons/PolygonService.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ r360.PolygonService = {
var cfg = {};
cfg.sources = [];

if ( !r360.isUndefined(travelOptions.isElevationEnabled()) ) cfg.elevation = travelOptions.isElevationEnabled();
if ( !r360.isUndefined(travelOptions.getReverse()) ) cfg.reverse = travelOptions.getReverse();
if ( !r360.isUndefined(travelOptions.getEdgeWeight()) ) cfg.edgeWeight = travelOptions.getEdgeWeight();
if ( !r360.isUndefined(travelOptions.isElevationEnabled()) ) cfg.elevation = travelOptions.isElevationEnabled();
if ( !r360.isUndefined(travelOptions.getReverse()) ) cfg.reverse = travelOptions.getReverse();
if ( !r360.isUndefined(travelOptions.getEdgeWeight()) ) cfg.edgeWeight = travelOptions.getEdgeWeight();
if ( !r360.isUndefined(travelOptions.getTravelTimeFactors()) ) cfg.travelTimeFactors = travelOptions.getTravelTimeFactors();

cfg.polygon = {};

Expand All @@ -23,7 +24,7 @@ r360.PolygonService = {
if ( !r360.isUndefined(travelOptions.getSrid()) ) cfg.polygon.srid = travelOptions.getSrid();
if ( !r360.isUndefined(travelOptions.getSimplifyMeter()) ) cfg.polygon.simplify = travelOptions.getSimplifyMeter();
if ( !r360.isUndefined(travelOptions.getBuffer()) ) cfg.polygon.buffer = travelOptions.getBuffer();
if ( !r360.isUndefined(travelOptions.getQuadrantSegments()) ) cfg.polygon.quadrantSegments = travelOptions.getQuadrantSegments();
if ( !r360.isUndefined(travelOptions.getQuadrantSegments()) ) cfg.polygon.quadrantSegments = travelOptions.getQuadrantSegments();

// add each source point and it's travel configuration to the cfg
travelOptions.getSources().forEach(function(source){
Expand Down
5 changes: 3 additions & 2 deletions src/rest/routes/RouteService.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ r360.RouteService = {

var cfg = { sources : [], targets : [], pathSerializer : travelOptions.getPathSerializer() };

if ( !r360.isUndefined(travelOptions.isElevationEnabled()) ) cfg.elevation = travelOptions.isElevationEnabled();
if ( !r360.isUndefined(travelOptions.getReverse()) ) cfg.reverse = travelOptions.getReverse();
if ( !r360.isUndefined(travelOptions.isElevationEnabled()) ) cfg.elevation = travelOptions.isElevationEnabled();
if ( !r360.isUndefined(travelOptions.getReverse()) ) cfg.reverse = travelOptions.getReverse();
if ( !r360.isUndefined(travelOptions.getTravelTimeFactors()) ) cfg.travelTimeFactors = travelOptions.getTravelTimeFactors();

travelOptions.getSources().forEach(function(source){

Expand Down
3 changes: 2 additions & 1 deletion src/rest/time/TimeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ r360.TimeService = {
maxRoutingLength : travelOptions.getMaxRoutingLength()
};

if ( !r360.isUndefined(travelOptions.isElevationEnabled()) ) cfg.elevation = travelOptions.isElevationEnabled();
if ( !r360.isUndefined(travelOptions.isElevationEnabled()) ) cfg.elevation = travelOptions.isElevationEnabled();
if ( !r360.isUndefined(travelOptions.getTravelTimeFactors()) ) cfg.travelTimeFactors = travelOptions.getTravelTimeFactors();
if ( !r360.isUndefined(travelOptions.getTravelTimes()) || !r360.isUndefined(travelOptions.getIntersectionMode()) ) {

cfg.polygon = {};
Expand Down
10 changes: 10 additions & 0 deletions src/util/TravelOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ r360.TravelOptions = function(){
this.serviceUrl = undefined;
this.serviceKey = undefined;

this.travelTimeFactors = undefined;

this.getReverse = function(){ return this.reverse; }
this.setReverse = function(reverse){ this.reverse = reverse; }

Expand Down Expand Up @@ -590,6 +592,14 @@ r360.TravelOptions = function(){
this.setEdgeWeight = function(edgeWeight){
this.edgeWeight = edgeWeight;
}

this.getTravelTimeFactors = function(){
return this.travelTimeFactors;
}

this.setTravelTimeFactors = function(travelTimeFactors){
this.travelTimeFactors = travelTimeFactors;
}
};

r360.travelOptions = function () {
Expand Down

0 comments on commit fec06fa

Please sign in to comment.