The [facilmap-types](https://www.npmjs.com/package/facilmap-types) package contains TypeScript typings for all the basic types used by the different components of FacilMap. Using TypeScript can be helpful to get some assistance what kind of properties an object provides and expects.
*`data` (<code>{ [fieldName: string]: string }</code>): The filled out form fields of the marker. This is a null-prototype object to avoid prototype pollution.
*`extraInfo` (<code>{ [type: string]: Array<[startIdx: number, endIdx: number, type: number]>> }</code> or null): Extra details about the route (set by the server). `type` can be for example `steepness`, `surface` or `waytype`. `startIdx` and `endIdx` describe a segment on the trackpoints of the route, the meaning of `type` can be seen in the documentation of [Leaflet.Heightgraph](https://github.com/GIScience/Leaflet.Heightgraph/blob/master/example/mappings.js).
*`data` (<code>{ [fieldName: string]: string }</code>): The filled out form fields of the line. This is a null-prototype object to avoid prototype pollution.
*`idx` (number): The sorting position of this type. When a list of types is shown to the user, it must be ordered by this value. If types were deleted or reordered, there may be gaps in the sequence of indexes, but no two types on the same map can ever have the same index. When setting this as part of a type creation/update, other types with a same/higher index will have their index increased to be moved down the list.
*`controlColour`, `controlSize`, `controlSymbol`, `controlShape`, `controlWidth`, `controlStroke` (boolean): If this field is a dropdown, whether the different options set a specific property on the object
*`default` (string/boolean): The default value of this field
*`options` ([object]): If this field is a dropdown or a checkbox, an array of objects with the following properties. For a checkbox, the array has to have 2 items, the first representing the unchecked and the second the checked state.
*`value` (string): The value of this option.
*`oldValue` (string): When renaming a dropdown option (using [`editType(data)`](./methods.md#edittype-data)), specify the former value here
*`left`, `top`, `right`, `bottom` (number): The bounding box of the line (set by the server)
*`routeId` (string): Some methods allow specifying a custom string here to identify the route. This allows having multiple active routes per connection.
## RouteMode
The route mode is a string that describes for what type of transportation a route should be calculated. The following route modes are available:
* (empty string), aliases `helicopter`, `straight`: Go in a straight line
*`pedestrian`, aliases `foot`, `walk`, `walking`: Go by foot
*`bicycle`, alias `bike`: Go by bicycle
*`car`: Go by car
*`track`: Special route mode for lines, indicates that the line is a track imported from a file, not a calculated route.
To use advanced routing settings, additional keywords can be appended to the route mode, separated by a space:
*`hgv`: HGV (truck) routing (in combination with `car`)
*`road`, `mountain`, `electric`: type of bicycle (in combination with `bicycle`).
*`hiking`, `wheelchair`: type of pedestrian (in combination with `pedestrian`).
*`avoid`: Has no effect, but can be inserted in front of the avoidance types to make the route mode more readable.
An example advanced route mode would be `pedestrian wheelchair details avoid steps fords`. Any unknown words inside the route mode should be ignored (they may be options that used to be available in the past).