forked from MapComplete/MapComplete
Add share icon, reordering of questions and icons, add urinal to toilet
This commit is contained in:
parent
a261577ef3
commit
4018e6710b
12 changed files with 416 additions and 395 deletions
|
@ -100,7 +100,7 @@ export default class LayerConfig {
|
|||
}
|
||||
|
||||
this.tagRenderings = trs(json.tagRenderings).concat(roamingRenderings);
|
||||
this.titleIcons = trs(json.titleIcons ?? ["wikipedialink","osmlink"]);
|
||||
this.titleIcons = trs(json.titleIcons ?? ["wikipedialink","osmlink", "sharelink"]);
|
||||
|
||||
|
||||
function tr(key, deflt) {
|
||||
|
|
|
@ -15,6 +15,8 @@ import * as maps from "../assets/layers/maps/maps.json"
|
|||
import * as information_boards from "../assets/layers/information_board/information_board.json"
|
||||
import * as direction from "../assets/layers/direction/direction.json"
|
||||
import * as surveillance_camera from "../assets/layers/surveillance_cameras/surveillance_cameras.json"
|
||||
import * as toilets from "../assets/layers/toilets/toilets.json"
|
||||
|
||||
import LayerConfig from "./JSON/LayerConfig";
|
||||
|
||||
export default class SharedLayers {
|
||||
|
@ -41,6 +43,7 @@ export default class SharedLayers {
|
|||
new LayerConfig(maps,[], "shared_layers"),
|
||||
new LayerConfig(direction,[], "shared_layers"),
|
||||
new LayerConfig(information_boards,[], "shared_layers"),
|
||||
new LayerConfig(toilets,[], "shared_layers"),
|
||||
new LayerConfig(surveillance_camera,[], "shared_layers")
|
||||
];
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import * as questions from "../assets/questions/questions.json";
|
||||
import TagRenderingConfig from "./JSON/TagRenderingConfig";
|
||||
import * as questions from "../assets/tagRenderings/questions.json";
|
||||
import * as icons from "../assets/tagRenderings/icons.json";
|
||||
|
||||
export default class SharedTagRenderings {
|
||||
|
||||
|
@ -7,13 +8,24 @@ export default class SharedTagRenderings {
|
|||
|
||||
private static generatedSharedFields() {
|
||||
const dict = {}
|
||||
for (const key in questions) {
|
||||
|
||||
|
||||
function add(key, store){
|
||||
try {
|
||||
dict[key] = new TagRenderingConfig(questions[key])
|
||||
dict[key] = new TagRenderingConfig(store[key])
|
||||
} catch (e) {
|
||||
console.error("COULD NOT PARSE", key, " FROM QUESTIONS:", e)
|
||||
console.error("BUG: could not parse", key, " from questions.json or icons.json", e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (const key in questions) {
|
||||
add(key, questions);
|
||||
}
|
||||
for (const key in icons) {
|
||||
add(key, icons);
|
||||
}
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue