You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/plugins/Routing/README.md
+44-44Lines changed: 44 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -13,70 +13,70 @@ This module has been written for the "BKG-Routing-Service" and uses the "Adresss
13
13
| - | - | - |
14
14
|serviceUrl|string|The url of the routing service to be used.|
15
15
|format|string|The format in which the answer of the routing service is expected in.|
16
-
|selectableTravelModes|string[]|Specifies which selection of transportation modes (e.g. driving-car, driving-hgv, foot-walking, cycling-regular, wheelchair) is available to the user. In the default setting, all modes are offered.|
17
-
|selectable Preferences|string[]|Specifies which preferences for the route are offered to the user.|
16
+
|selectableTravelModes|string[]|Specifies which selection of transportation modes (driving-car, driving-hgv, foot-walking, cycling-regular, wheelchair) is available to the user. In the default setting, all modes are offered.|
17
+
|selectable Preferences|string[]|Specifies which preferences for the route (recommended, fastest, shortest) are offered to the user.|
18
18
|displayPreferences|bolean|Defines wether the preferences for the route are offered to the user for selection.|
19
19
|displayRouteTypesToAvoid|boolean|Defines wether route types to avoid are offered to the user for selection.|
20
-
|routeStyle|||
20
+
|routeStyle|style? | Please see example below for styling options. Defaults to standard OpenLayers styling. |
21
21
|routeStyle.stroke|||
22
+
|addressSearch|||
23
+
|searchMethods | searchMethodsObject[]| Array of search method descriptions. Only searches configured here can be used. |
24
+
|minLength | number? | Minimal input length after which searches are started. Defaults to 0. |
25
+
|waitMs | number? | Debounce time in ms for search requests after last user input. Defaults to 0. |
|addressSearch.searchMethods.url|string|The url of the service to be used for the address search.|
34
-
|addressSearch.minLength|number||
35
-
|addressSearch.waitMs|number||
36
33
37
-
## Store // TODO: Ans Routing-Plugin anpassen
34
+
<details>
38
35
39
-
### Mutations
36
+
The `@masterportal/masterportalapi` has vectorStyles in development. As soon as that's done, we shall use its styling syntax and methods.
40
37
41
-
#### setSelectedGroupName
38
+
For the time being, please use this example as a rough reference as to what can currently be done.
42
39
43
-
This can be used to change the selected search group by name.
40
+
<summary>Example configuration</summary>
44
41
45
42
```js
46
-
map.$store.commit(
47
-
'plugin/addressSearch/setSelectedGroupName',
48
-
'Parcel search'
49
-
)
43
+
routing: {
44
+
routeStyle: {
45
+
stroke: {
46
+
color:'#e51313',
47
+
width:6,
48
+
},
49
+
},
50
+
}
50
51
```
51
52
52
-
Please mind that programmatically changing the search group will _not_ trigger a search, unlike a search group change by the user. If you need a search after change, consider the `search` action.
53
-
54
-
### Actions
53
+
</details>
55
54
56
-
#### search
55
+
#### addressSearch.searchMethodsObject
57
56
58
-
This is a purely programmatical search method. It is not used by user input.
57
+
| fieldName | type | description |
58
+
| - | - | - |
59
+
| queryParameters | object? | The object further describes details for the search request. Its contents vary by service type, see documentation below. |
60
+
| type | enum["bkg", "wfs", "mpapi"]| Service type. For now, mpapi is the only option. |
61
+
| url | string | Search service URL. Should you require a service provider, please contact us for further information. |
> **Please mind that this requires a configured backend. A WFS's Stored Query is requested with predefined parameters using the [masterportalapi](https://bitbucket.org/geowerkstatt-hamburg/masterportalapi/src/master/). This implementation is meant for e.g. https://geodienste.hamburg.de/HH_WFS_GAGES, but works with other WFS configured in the same manner.**
68
66
69
-
| fieldName |type|description|
67
+
| fieldName |Type|Description|
70
68
| - | - | - |
71
-
| input | string | Search string to be used. |
72
-
| autoselect | enum['first', 'only', 'never']| By default, 'never' is selected, and results will be presented as if the user searched for them. Setting 'only' will autoselect if a single result was returned; setting 'first' will autoselect the first of an arbitrary amount of results >=1. |
69
+
| searchAddress | Boolean? | Defines whether address search is active. For backward compatibility, if "searchAddress" is not configured, the "searchAddress" attribute is set to "true" when "searchStreets" and "searchHouseNumbers" are set to "true". |
70
+
| searchStreets | Boolean? | Defines whether street search is active. Precondition to set `searchHouseNumbers` to `true`. |
71
+
| searchHouseNumbers | Boolean? | Defines whether house numbers should be searched for. Requires `searchStreets` to be set to `true`, too. |
73
72
74
-
### State
73
+
While all fields are optional, configuring none of them will yield undefined behaviour. At least one search instruction should be set to `true`.
Address object _as returned by search service_. The result and its fields differ depending on the used backend. The callback is used whenever the user clicks on a search result or started a one-result search, which results in an auto-select of the singular result.
0 commit comments