updated service doc
This commit is contained in:
parent
7ffee3a911
commit
26879159da
1 changed files with 38 additions and 5 deletions
|
@ -39,12 +39,45 @@ Please note: when they have a parameter 'weight' the result is not an absolute n
|
|||
|
||||
This parameters are needed to tell BRouter what to do.
|
||||
|
||||
### using profiles
|
||||
|
||||
For calulation BRouter uses a set of rules defined in a profile. See description of profile [rules](https://github.com/abrensch/brouter/blob/master/docs/developers/profile_developers_guide.md).
|
||||
|
||||
Here we talk about how we let BRouter know witch profile to use.
|
||||
There are three ways:
|
||||
|
||||
1. use the parameter 'v' and 'fast'
|
||||
```
|
||||
"v"-->[motorcar|bicycle|foot]
|
||||
"fast"-->[0|1]
|
||||
This enables BRouter to look into the file serviceconfig.dat.
|
||||
In there BRouter find the profile associated for e.g bicyle_fast trekking
|
||||
This could be changed by the user calling the BRouter app server-mode.
|
||||
```
|
||||
|
||||
2. use the profile parameter
|
||||
```
|
||||
profile=trekking
|
||||
It needs an available file in the BRouter profile folder e.g. trekking.brf
|
||||
```
|
||||
|
||||
3. use a remote profile
|
||||
```
|
||||
remoteProfile=a long string with routing rules
|
||||
This is saved in BRouter profile folder temporary with the file name 'remote.brf'
|
||||
```
|
||||
|
||||
|
||||
### profile parameter
|
||||
|
||||
Profile parameters affect the result of a profile.
|
||||
The variables inside a profile predefine a value e.g. avoidsteps=1
|
||||
A parameter call gives the chance to change this start value without changing the profile e.g. avoidsteps=0
|
||||
For the app it is a list of params concatenated by '&'. E.g. extraParams=avoidferry=1&avoidsteps=0
|
||||
The server calls profile params by a prefix 'profile:'. E.g. ...&profile:avoidferry=1&profile:avoidsteps=0
|
||||
|
||||
By using this parameter logic, there is no need to edit a profile before sending.
|
||||
|
||||
### using profile parameter inside an app
|
||||
|
||||
To be flexible it is possible to send a profile to BRouter - server or app.
|
||||
|
|
Loading…
Reference in a new issue