forked from MapComplete/MapComplete
Fix build
This commit is contained in:
parent
bf86c22d85
commit
1e262359bb
21 changed files with 34 additions and 788 deletions
|
@ -56,7 +56,7 @@ export default class SpecialVisualisationUtils {
|
|||
knownSpecial = extraMappings.find(em => em.funcName === fName)
|
||||
}
|
||||
if(!knownSpecial){
|
||||
throw "Didn't find a special visualisation: "+fName
|
||||
throw "Didn't find a special visualisation: "+fName+" in "+template
|
||||
}
|
||||
|
||||
// Always a boring string
|
||||
|
|
|
@ -781,9 +781,7 @@ export default class SpecialVisualizations {
|
|||
funcName: "list_reviews",
|
||||
docs: "Adds an overview of the mangrove-reviews of this object. Mangrove.Reviews needs - in order to identify the reviewed object - a coordinate and a name. By default, the name of the object is given, but this can be overwritten",
|
||||
needsUrls: [MangroveReviews.ORIGINAL_API],
|
||||
example:
|
||||
"`{reviews()}` for a vanilla review, `{reviews(name, play_forest)}` to review a play forest. If a name is known, the name will be used as identifier, otherwise 'play_forest' is used",
|
||||
args: [
|
||||
args: [
|
||||
{
|
||||
name: "subjectKey",
|
||||
defaultValue: "name",
|
||||
|
@ -810,6 +808,32 @@ export default class SpecialVisualizations {
|
|||
return new SvelteUIElement(AllReviews, { reviews, state, tags, feature, layer })
|
||||
},
|
||||
},
|
||||
{
|
||||
funcName:"reviews",
|
||||
example:
|
||||
"`{reviews()}` for a vanilla review, `{reviews(name, play_forest)}` to review a play forest. If a name is known, the name will be used as identifier, otherwise 'play_forest' is used",
|
||||
docs:"A pragmatic combination of `create_review` and `list_reviews`",
|
||||
args: [
|
||||
{
|
||||
name: "subjectKey",
|
||||
defaultValue: "name",
|
||||
doc: "The key to use to determine the subject. If specified, the subject will be <b>tags[subjectKey]</b>",
|
||||
},
|
||||
{
|
||||
name: "fallback",
|
||||
doc: "The identifier to use, if <i>tags[subjectKey]</i> as specified above is not available. This is effectively a fallback value",
|
||||
},
|
||||
],
|
||||
constr(state: SpecialVisualizationState, tagSource: UIEventSource<Record<string, string>>, args: string[], feature: Feature, layer: LayerConfig): BaseUIElement {
|
||||
return new Combine([
|
||||
SpecialVisualizations.specialVisualisationsDict["create_review"].constr(state, tagSource, args, feature, layer),
|
||||
SpecialVisualizations.specialVisualisationsDict["list_reviews"].constr(state, tagSource, args, feature, layer)
|
||||
|
||||
|
||||
])
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
funcName: "import_mangrove_key",
|
||||
docs: "Only makes sense in the usersettings. Allows to import a mangrove public key and to use this to make reviews",
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"properties":{"name":"Bing Maps Aerial","id":"Bing","url":"https://ecn.t0.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=14634&pr=odbl&n=f","type":"bing","category":"photo","min_zoom":1,"max_zoom":22},"type":"Feature","geometry":null}
|
||||
{"properties":{"name":"Bing Maps Aerial","id":"Bing","url":"https://ecn.t1.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=14634&pr=odbl&n=f","type":"bing","category":"photo","min_zoom":1,"max_zoom":22},"type":"Feature","geometry":null}
|
Loading…
Add table
Add a link
Reference in a new issue