forked from MapComplete/MapComplete
Full code cleanup
This commit is contained in:
parent
3a4a2a2016
commit
fa971ffbbf
300 changed files with 16352 additions and 19284 deletions
|
@ -1,10 +1,6 @@
|
|||
|
||||
|
||||
Available types for text fields
|
||||
Available types for text fields
|
||||
=================================
|
||||
|
||||
|
||||
|
||||
## Table of contents
|
||||
|
||||
1. [Available types for text fields](#available-types-for-text-fields)
|
||||
|
@ -25,77 +21,50 @@
|
|||
+ [opening_hours](#opening_hours)
|
||||
+ [color](#color)
|
||||
|
||||
The listed types here trigger a special input element. Use them in `tagrendering.freeform.type` of your tagrendering to
|
||||
activate them
|
||||
|
||||
|
||||
The listed types here trigger a special input element. Use them in `tagrendering.freeform.type` of your tagrendering to activate them
|
||||
|
||||
|
||||
|
||||
### string
|
||||
|
||||
|
||||
### string
|
||||
|
||||
A basic string
|
||||
|
||||
|
||||
|
||||
### text
|
||||
|
||||
|
||||
### text
|
||||
|
||||
A string, but allows input of longer strings more comfortably and supports newlines (a text area)
|
||||
|
||||
|
||||
|
||||
### date
|
||||
|
||||
|
||||
### date
|
||||
|
||||
A date
|
||||
|
||||
|
||||
|
||||
### direction
|
||||
|
||||
|
||||
### direction
|
||||
|
||||
A geographical direction, in degrees. 0° is north, 90° is east, ... Will return a value between 0 (incl) and 360 (excl)
|
||||
|
||||
### length
|
||||
|
||||
A geographical length in meters (rounded at two points). Will give an extra minimap with a measurement tool.
|
||||
Arguments: [ zoomlevel, preferredBackgroundMapType (comma separated) ], e.g. `["21", "map,photo"]
|
||||
|
||||
### length
|
||||
### wikidata
|
||||
|
||||
A wikidata identifier, e.g. Q42.
|
||||
|
||||
|
||||
A geographical length in meters (rounded at two points). Will give an extra minimap with a measurement tool. Arguments: [ zoomlevel, preferredBackgroundMapType (comma separated) ], e.g. `["21", "map,photo"]
|
||||
|
||||
|
||||
|
||||
### wikidata
|
||||
|
||||
|
||||
|
||||
A wikidata identifier, e.g. Q42.
|
||||
|
||||
### Helper arguments
|
||||
|
||||
|
||||
### Helper arguments
|
||||
|
||||
name | doc
|
||||
------ | -----
|
||||
key | the value of this tag will initialize search (default: name)
|
||||
options | A JSON-object of type `{ removePrefixes: string[], removePostfixes: string[] }`.
|
||||
options | A JSON-object of type `{ removePrefixes: string[], removePostfixes: string[] }`.
|
||||
|
||||
subarg | doc
|
||||
-------- | -----
|
||||
removePrefixes | remove these snippets of text from the start of the passed string to search
|
||||
removePostfixes | remove these snippets of text from the end of the passed string to search
|
||||
|
||||
|
||||
### Example usage
|
||||
|
||||
### Example usage
|
||||
|
||||
The following is the 'freeform'-part of a layer config which will trigger a search for the wikidata item corresponding with the name of the selected feature. It will also remove '-street', '-square', ... if found at the end of the name
|
||||
The following is the 'freeform'-part of a layer config which will trigger a search for the wikidata item corresponding
|
||||
with the name of the selected feature. It will also remove '-street', '-square', ... if found at the end of the name
|
||||
|
||||
```
|
||||
"freeform": {
|
||||
|
@ -116,96 +85,57 @@ removePostfixes | remove these snippets of text from the end of the passed strin
|
|||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### int
|
||||
|
||||
|
||||
### int
|
||||
|
||||
A number
|
||||
|
||||
|
||||
|
||||
### nat
|
||||
|
||||
|
||||
### nat
|
||||
|
||||
A positive number or zero
|
||||
|
||||
|
||||
|
||||
### pnat
|
||||
|
||||
|
||||
### pnat
|
||||
|
||||
A strict positive number
|
||||
|
||||
|
||||
|
||||
### float
|
||||
|
||||
|
||||
### float
|
||||
|
||||
A decimal
|
||||
|
||||
|
||||
|
||||
### pfloat
|
||||
|
||||
|
||||
### pfloat
|
||||
|
||||
A positive decimal (incl zero)
|
||||
|
||||
|
||||
|
||||
### email
|
||||
|
||||
|
||||
### email
|
||||
|
||||
An email adress
|
||||
|
||||
### url
|
||||
|
||||
The validatedTextField will format URLs to always be valid and have a https://-header (even though the 'https'-part will
|
||||
be hidden from the user
|
||||
|
||||
### url
|
||||
|
||||
|
||||
|
||||
The validatedTextField will format URLs to always be valid and have a https://-header (even though the 'https'-part will be hidden from the user
|
||||
|
||||
|
||||
|
||||
### phone
|
||||
|
||||
|
||||
### phone
|
||||
|
||||
A phone number
|
||||
|
||||
### opening_hours
|
||||
|
||||
Has extra elements to easily input when a POI is opened.
|
||||
|
||||
### opening_hours
|
||||
|
||||
|
||||
|
||||
Has extra elements to easily input when a POI is opened.
|
||||
|
||||
### Helper arguments
|
||||
|
||||
|
||||
### Helper arguments
|
||||
|
||||
name | doc
|
||||
------ | -----
|
||||
options | A JSON-object of type `{ prefix: string, postfix: string }`.
|
||||
options | A JSON-object of type `{ prefix: string, postfix: string }`.
|
||||
|
||||
subarg | doc
|
||||
-------- | -----
|
||||
prefix | Piece of text that will always be added to the front of the generated opening hours. If the OSM-data does not start with this, it will fail to parse
|
||||
postfix | Piece of text that will always be added to the end of the generated opening hours
|
||||
|
||||
|
||||
### Example usage
|
||||
|
||||
### Example usage
|
||||
|
||||
To add a conditional (based on time) access restriction:
|
||||
To add a conditional (based on time) access restriction:
|
||||
|
||||
```
|
||||
|
||||
|
@ -221,14 +151,11 @@ postfix | Piece of text that will always be added to the end of the generated op
|
|||
}
|
||||
```
|
||||
|
||||
*Don't forget to pass the prefix and postfix in the rendering as well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )`
|
||||
*Don't forget to pass the prefix and postfix in the rendering as
|
||||
well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )`
|
||||
|
||||
### color
|
||||
|
||||
|
||||
### color
|
||||
|
||||
|
||||
|
||||
Shows a color picker
|
||||
Shows a color picker
|
||||
|
||||
This document is autogenerated from ValidatedTextField.ts
|
Loading…
Add table
Add a link
Reference in a new issue