Adding documentation
This commit is contained in:
parent
d293429c68
commit
58bcdbe17a
2 changed files with 42 additions and 3 deletions
|
@ -16,9 +16,35 @@ export class LayerDefinition {
|
|||
* This name is shown in the 'add XXX button'
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* These tags are added whenever a new point is added by the user on the map.
|
||||
* This is the ideal place to add extra info, such as "fixme=added by MapComplete, geometry should be checked"
|
||||
*/
|
||||
newElementTags: Tag[]
|
||||
/**
|
||||
* Not really used anymore
|
||||
* This is meant to serve as icon in the buttons
|
||||
*/
|
||||
icon: string;
|
||||
/**
|
||||
* Only show this layer starting at this zoom level
|
||||
*/
|
||||
minzoom: number;
|
||||
|
||||
/**
|
||||
* This tagfilter is used to query overpass.
|
||||
* Examples are:
|
||||
*
|
||||
* new Tag("amenity","drinking_water")
|
||||
*
|
||||
* or a query for bicycle pumps which have two tagging schemes:
|
||||
* new Or([
|
||||
* new Tag("service:bicycle:pump","yes") ,
|
||||
* new And([
|
||||
* new Tag("amenity","compressed_air"),
|
||||
* new Tag("bicycle","yes")])
|
||||
* ])
|
||||
*/
|
||||
overpassFilter: TagsFilter;
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,20 @@ export class Layout {
|
|||
public welcomeTail: string;
|
||||
|
||||
public locationContains: string[];
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param name: The name used in the query string. If in the query "quests=<name>" is defined, it will select this layout
|
||||
* @param title: Will be used in the <title> of the page
|
||||
* @param layers: The layers to show, a list of LayerDefinitions
|
||||
* @param startzoom: The initial starting zoom of the map
|
||||
* @param startLat:The initial starting latitude of the map
|
||||
* @param startLon: the initial starting longitude of the map
|
||||
* @param welcomeMessage: This message is shown in the collapsable box on the left
|
||||
* @param gettingStartedPlzLogin: This is shown below the welcomemessage and wrapped in a login link.
|
||||
* @param welcomeBackMessage: This is shown when the user is logged in
|
||||
* @param welcomeTail: This text is shown below the login message. It is ideal for extra help
|
||||
*/
|
||||
constructor(
|
||||
name: string,
|
||||
title: string,
|
||||
|
@ -26,8 +39,8 @@ export class Layout {
|
|||
startLat: number,
|
||||
startLon: number,
|
||||
welcomeMessage: string,
|
||||
gettingStartedPlzLogin: string,
|
||||
welcomeBackMessage: string,
|
||||
gettingStartedPlzLogin: string = "Please login to get started",
|
||||
welcomeBackMessage: string = "You are logged in. Welcome back!",
|
||||
welcomeTail: string = ""
|
||||
) {
|
||||
this.title = title;
|
||||
|
|
Loading…
Reference in a new issue