Fix taginfo script, formatting, docs regeneration

This commit is contained in:
pietervdvn 2021-07-03 22:00:36 +02:00
parent 2f05010648
commit e3f2c56d3e
5 changed files with 8 additions and 12 deletions

View file

@ -1,8 +1,7 @@
import LayoutConfig from "./JSON/LayoutConfig";
import AllKnownLayers from "./AllKnownLayers";
import * as known_themes from "../assets/generated/known_layers_and_themes.json"
import {LayoutConfigJson} from "./JSON/LayoutConfigJson";
import * as all_layouts from "../assets/generated/known_layers_and_themes.json"
export class AllKnownLayouts {

View file

@ -1,7 +1,6 @@
import TagRenderingConfig from "./JSON/TagRenderingConfig";
import * as questions from "../assets/tagRenderings/questions.json";
import * as icons from "../assets/tagRenderings/icons.json";
import {Utils} from "../Utils";
export default class SharedTagRenderings {
@ -12,9 +11,6 @@ export default class SharedTagRenderings {
const dict = new Map<string, TagRenderingConfig>();
function add(key, store) {
if(Utils.runningFromConsole){
return;
}
try {
dict.set(key, new TagRenderingConfig(store[key], undefined, `SharedTagRenderings.${key}`))
} catch (e) {

View file

@ -42,7 +42,7 @@ image-key | image | Image tag to add the URL to (or image-tag:0, image-tag:1 whe
name | default | description
------ | --------- | -------------
zoomlevel | 18 | The zoomlevel: the higher, the more zoomed in with 1 being the entire world and 19 being really close
zoomlevel | 18 | The (maximum) zoomlevel: the target zoomlevel after fitting the entire feature. The minimap will fit the entire feature, then zoom out to this zoom level. The higher, the more zoomed in with 1 being the entire world and 19 being really close
idKey | id | (Matches all resting arguments) This argument should be the key of a property of the feature. The corresponding value is interpreted as either the id or the a list of ID's. The features with these ID's will be shown on this minimap.
#### Example usage

View file

@ -47,8 +47,9 @@ function generateLayerUsage(layer: LayerConfig, layout: LayoutConfig): any [] {
for (const tr of layer.tagRenderings) {
{
const usesImageCarousel = (tr.render?.txt?.indexOf("image_carousel()") ?? -2) > 0
const usesImageUpload = (tr.render?.txt?.indexOf("image_upload()") ?? -2) > 0
const usesImageCarousel = (tr.render?.txt?.indexOf("image_carousel") ?? -2) > 0
const usesImageUpload = (tr.render?.txt?.indexOf("image_upload") ?? -2) > 0
if (usesImageCarousel || usesImageUpload) {
const descrNoUpload = `The layer '${layer.name.txt} shows images based on the keys image, image:0, image:1,... and wikidata, wikipedia, wikimedia_commons and mapillary`;