forked from MapComplete/MapComplete
Small improvements
This commit is contained in:
parent
de721c6c37
commit
1a4417545a
5 changed files with 28 additions and 24 deletions
|
@ -87,6 +87,10 @@ export default class TagRenderingConfig {
|
|||
if (this.freeform.key === undefined || this.freeform.key === "") {
|
||||
throw `Freeform.key is undefined or the empty string - this is not allowed; either fill out something or remove the freeform block alltogether. Error in ${context}`
|
||||
}
|
||||
if(json.freeform["args"] !== undefined){
|
||||
throw `Freeform.args is defined. This should probably be 'freeform.helperArgs' (at ${context})`
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (ValidatedTextField.AllTypes[this.freeform.type] === undefined) {
|
||||
|
|
|
@ -142,7 +142,7 @@ export default class LengthInput extends InputElement<string> {
|
|||
if (leaflet) {
|
||||
const first = leaflet.layerPointToLatLng(firstClickXY)
|
||||
const last = leaflet.layerPointToLatLng([dx, dy])
|
||||
const geoDist = Math.floor(GeoOperations.distanceBetween([first.lng, first.lat], [last.lng, last.lat]) * 100000) / 100
|
||||
const geoDist = Math.floor(GeoOperations.distanceBetween([first.lng, first.lat], [last.lng, last.lat]) * 10000) / 10
|
||||
self.value.setData("" + geoDist)
|
||||
}
|
||||
|
||||
|
|
|
@ -168,19 +168,5 @@
|
|||
},
|
||||
"color": {
|
||||
"render": "#FFC0CB"
|
||||
},
|
||||
"presets": [
|
||||
{
|
||||
"tags": [
|
||||
"man_made=watermill",
|
||||
"fixme=Toegevoegd met MapComplete, geometry nog uit te tekenen"
|
||||
],
|
||||
"title": {
|
||||
"nl": "Paden"
|
||||
},
|
||||
"description": {
|
||||
"nl": "Voeg een ontbrekend, erkend pad toe."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -633,12 +633,11 @@
|
|||
},
|
||||
"freeform": {
|
||||
"key": "width:carriageway",
|
||||
"addExtraTags": [],
|
||||
"type": "pfloat"
|
||||
"type": "length", "helperArgs": ["20", "map"]
|
||||
},
|
||||
"question": {
|
||||
"en": "What is the carriage width of this road (in meters)?",
|
||||
"nl": "Hoe breed is de rijbaan in deze straat (in meters)?"
|
||||
"en": "What is the carriage width of this road (in meters)?<br/><span class='subtle'>This is measured from kerb to kerb, including parking lanes</span>",
|
||||
"nl": "Hoe breed is de rijbaan in deze straat (in meters)?<br/><span class='subtle'>Gemeten van stoepsteen tot stoepsten, inclusief parkeerstroken</span>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -972,7 +971,7 @@
|
|||
},
|
||||
"freeform": {
|
||||
"key": "cycleway:buffer",
|
||||
"type": "pfloat"
|
||||
"type": "length", "helperArgs": ["20", "map"]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1301,6 +1300,20 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"render": {
|
||||
"en": "The carriage width of this road is <strong>{width:carriageway}m</strong>",
|
||||
"nl": "De breedte van deze rijbaan in deze straat is <strong>{width:carriageway}m</strong>"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "width:carriageway",
|
||||
"type": "length", "helperArgs": ["20", "map"]
|
||||
},
|
||||
"question": {
|
||||
"en": "What is the carriage width of this road (in meters)?<br/><span class='subtle'>This is measured from kerb to kerb, including parking lanes</span>",
|
||||
"nl": "Hoe breed is de rijbaan in deze straat (in meters)?<br/><span class='subtle'>Gemeten van stoepsteen tot stoepsten, inclusief parkeerstroken</span>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1496,7 +1509,7 @@
|
|||
},
|
||||
"freeform": {
|
||||
"key": "maxwidth:physical",
|
||||
"type": "pfloat"
|
||||
"type": "length", "helperArgs": ["20", "map"]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1516,7 +1529,8 @@
|
|||
},
|
||||
"freeform": {
|
||||
"key": "width:seperation",
|
||||
"type": "pfloat"
|
||||
"type": "length",
|
||||
"helperArgs": ["20", "map"]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -165,7 +165,7 @@
|
|||
"downloadAsPdf": "Download a PDF of the current map",
|
||||
"downloadAsPdfHelper": "Ideal to print the current map",
|
||||
"downloadGeojson": "Download visible data as geojson",
|
||||
"downloadGeoJsonHelper": "Compatible with QGIS, OsmAnd, ArcGIS, ESRI, ...",
|
||||
"downloadGeoJsonHelper": "Compatible with QGIS, ArcGIS, ESRI, ...",
|
||||
"downloadCSV": "Download visible data as CSV",
|
||||
"downloadCSVHelper": "Compatible with LibreOffice Calc, Excel, ...",
|
||||
"includeMetaData": "Include metadata (last editor, calculated values, ...)",
|
||||
|
|
Loading…
Reference in a new issue