forked from MapComplete/MapComplete
Refactoring: remove unused file
This commit is contained in:
parent
4e033a93a5
commit
6383311dc2
4 changed files with 34 additions and 76 deletions
26
src/Logic/Osm/OsmWiki.ts
Normal file
26
src/Logic/Osm/OsmWiki.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* Various tools for the OSM wiki
|
||||
*/
|
||||
export default class OsmWiki {
|
||||
|
||||
/**
|
||||
* Create a link to the wiki for the given key and value (optional)
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
public static constructLink(key: string, value?: string) : string{
|
||||
if (value !== undefined) {
|
||||
return `https://wiki.openstreetmap.org/wiki/Tag:${key}%3D${value}`
|
||||
}
|
||||
return "https://wiki.openstreetmap.org/wiki/Key:" + key
|
||||
}
|
||||
|
||||
public static constructLinkMd(key: string, value?: string) : string {
|
||||
const link = this.constructLink(key, value)
|
||||
let displayed = key
|
||||
if(value){
|
||||
displayed += "="+value
|
||||
}
|
||||
return `[${displayed}](${link})`
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue