Difference between revisions of "Develop auto tables"
Jump to navigation
Jump to search
Error fetching URL: Could not resolve host: ogfoverpass.rent-a-planet.com
There was a problem during the HTTP request: 0 Error
Could not get URL https://ogfoverpass.rent-a-planet.com/api/interpreter?data=%28node%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3Bway%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3Brelation%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3B%29%3Bout%20body%3B%3E%3Bout%20skel%20qt%3B after 3 tries.
m (→Table) |
|||
| Line 241: | Line 241: | ||
==Table== | ==Table== | ||
| + | |||
{| {{Template:Rel data | {{{relation}}} | {{{type}}} | {{{column1tag}}} | {{{column2tag}}} | {{{column3tag}}} | {{{column4tag}}} | {{{column5tag}}} | {{{column6tag}}} | {{{column7tag}}} | {{{column8tag}}} | {{{column9tag}}} }} | {| {{Template:Rel data | {{{relation}}} | {{{type}}} | {{{column1tag}}} | {{{column2tag}}} | {{{column3tag}}} | {{{column4tag}}} | {{{column5tag}}} | {{{column6tag}}} | {{{column7tag}}} | {{{column8tag}}} | {{{column9tag}}} }} | ||
| − | {| class= | + | {{ #if:{{{collapsible|}}} | |
| − | ! | + | {{ #if:{{{collapsed|}}} | |
| − | ! | + | {{{!}} class="wikitable sortable mw-collapsible mw-collapsed;" | |
| − | {{!}}- | + | {{{!}} class="wikitable sortable mw-collapsible" }} | |
| + | {{{!}} class="wikitable sortable" }} style="text-align:left; width:{{{width|500}}}px;" | ||
| + | |- | ||
| + | ! class="unsortable" style="background:#{{{bgcolor|CCCCFF}}};" {{ #if:{{{column9tag|}}} | | ||
| + | colspan="9" | {{ #if:{{{column8tag|}}} | | ||
| + | colspan="8" | {{ #if:{{{column7tag|}}} | | ||
| + | colspan="7" | {{ #if:{{{column6tag|}}} | | ||
| + | colspan="6" | {{ #if:{{{column5tag|}}} | | ||
| + | colspan="5" | {{ #if:{{{column4tag|}}} | | ||
| + | colspan="4" | {{ #if:{{{column3tag|}}} | | ||
| + | colspan="3" | {{ #if:{{{column2tag|}}} | | ||
| + | colspan="2" | {{ #if:{{{column1tag|}}} | | ||
| + | colspan="1" }} }} }} }} }} }} }} }} }} | {{{topic|Table}}} | ||
| + | ! class="unsortable" style="background:#{{{bgcolor|CCCCFF}}}; text-align:right; width:50px;" | {{Refresh}} | ||
| + | |- | ||
| + | {{ #if:{{{column1tag|}}} | | ||
| + | {{ #if:{{{column1sort|}}}{{{column1width|}}} | | ||
| + | ! {{ #if:{{{column1sort|}}} | | ||
| + | class="unsortable" }} {{ #if:{{{column1width|}}} | | ||
| + | style="width:{{{column1width}}}px;" }} {{!}} | ! }} {{{column1name}}} | ||
| + | {{ #if:{{{column2tag|}}} | | ||
| + | {{ #if:{{{column2sort|}}}{{{column2width|}}} | | ||
| + | ! {{ #if:{{{column2sort|}}} | | ||
| + | class="unsortable" }} {{ #if:{{{column2width|}}} | | ||
| + | style="width:{{{column2width}}}px;" }} {{!}} | ! }} {{{column2name}}} | ||
| + | {{ #if:{{{column3tag|}}} | | ||
| + | {{ #if:{{{column3sort|}}}{{{column3width|}}} | | ||
| + | ! {{ #if:{{{column3sort|}}} | | ||
| + | class="unsortable" }} {{ #if:{{{column3width|}}} | | ||
| + | style="width:{{{column3width}}}px;" }} {{!}} | ! }} {{{column3name}}} | ||
| + | {{ #if:{{{column4tag|}}} | | ||
| + | {{ #if:{{{column4sort|}}}{{{column4width|}}} | | ||
| + | ! {{ #if:{{{column4sort|}}} | | ||
| + | class="unsortable" }} {{ #if:{{{column4width|}}} | | ||
| + | style="width:{{{column4width}}}px;" }} {{!}} | ! }} {{{column4name}}} | ||
| + | {{ #if:{{{column5tag|}}} | | ||
| + | {{ #if:{{{column5sort|}}}{{{column5width|}}} | | ||
| + | ! {{ #if:{{{column5sort|}}} | | ||
| + | class="unsortable" }} {{ #if:{{{column5width|}}} | | ||
| + | style="width:{{{column5width}}}px;" }} {{!}} | ! }} {{{column5name}}} | ||
| + | {{ #if:{{{column6tag|}}} | | ||
| + | {{ #if:{{{column6sort|}}}{{{column6width|}}} | | ||
| + | ! {{ #if:{{{column6sort|}}} | | ||
| + | class="unsortable" }} {{ #if:{{{column6width|}}} | | ||
| + | style="width:{{{column6width}}}px;" }} {{!}} | ! }} {{{column6name}}} | ||
| + | {{ #if:{{{column7tag|}}} | | ||
| + | {{ #if:{{{column7sort|}}}{{{column7width|}}} | | ||
| + | ! {{ #if:{{{column7sort|}}} | | ||
| + | class="unsortable" }} {{ #if:{{{column7width|}}} | | ||
| + | style="width:{{{column7width}}}px;" }} {{!}} | ! }} {{{column7name}}} | ||
| + | {{ #if:{{{column8tag|}}} | | ||
| + | {{ #if:{{{column8sort|}}}{{{column8width|}}} | | ||
| + | ! {{ #if:{{{column8sort|}}} | | ||
| + | class="unsortable" }} {{ #if:{{{column8width|}}} | | ||
| + | style="width:{{{column8width}}}px;" }} {{!}} | ! }} {{{column8name}}} | ||
| + | {{ #if:{{{column9tag|}}} | | ||
| + | {{ #if:{{{column9sort|}}}{{{column9width|}}} | | ||
| + | ! {{ #if:{{{column9sort|}}} | | ||
| + | class="unsortable" }} {{ #if:{{{column9width|}}} | | ||
| + | style="width:{{{column9width}}}px;" }} {{!}} | ! }} {{{column9name}}} }} }} }} }} }} }} }} }} }} | ||
| + | ! class="unsortable" | Map | ||
| + | |- | ||
{{#for_external_table:<nowiki/> | {{#for_external_table:<nowiki/> | ||
| − | {{!}}{{{ | + | {{ #if:{{{column1tag|}}} | |
| − | {{!}}[ | + | {{!}} {{ #if:{{{column1link|}}} | |
| + | [[{{{{{{column1tag|}}}}}}]] | {{{{{{column1tag|}}}}}} | ||
| + | }} | ||
| + | {{ #if:{{{column2tag|}}} | | ||
| + | {{!}} {{ #if:{{{column2link|}}} | | ||
| + | [[{{{{{{column2tag|}}}}}}]] | {{{{{{column2tag|}}}}}} | ||
| + | }} | ||
| + | {{ #if:{{{column3tag|}}} | | ||
| + | {{!}} {{ #if:{{{column3link|}}} | | ||
| + | [[{{{{{{column3tag|}}}}}}]] | {{{{{{column3tag|}}}}}} | ||
| + | }} | ||
| + | {{ #if:{{{column4tag|}}} | | ||
| + | {{!}} {{ #if:{{{column4link|}}} | | ||
| + | [[{{{{{{column4tag|}}}}}}]] | {{{{{{column4tag|}}}}}} | ||
| + | }} | ||
| + | {{ #if:{{{column5tag|}}} | | ||
| + | {{!}} {{ #if:{{{column5link|}}} | | ||
| + | [[{{{{{{column5tag|}}}}}}]] | {{{{{{column5tag|}}}}}} | ||
| + | }} | ||
| + | {{ #if:{{{column6tag|}}} | | ||
| + | {{!}} {{ #if:{{{column6link|}}} | | ||
| + | [[{{{{{{column6tag|}}}}}}]] | {{{{{{column6tag|}}}}}} | ||
| + | }} | ||
| + | {{ #if:{{{column7tag|}}} | | ||
| + | {{!}} {{ #if:{{{column7link|}}} | | ||
| + | [[{{{{{{column7tag|}}}}}}]] | {{{{{{column7tag|}}}}}} | ||
| + | }} | ||
| + | {{ #if:{{{column8tag|}}} | | ||
| + | {{!}} {{ #if:{{{column8link|}}} | | ||
| + | [[{{{{{{column8tag|}}}}}}]] | {{{{{{column8tag|}}}}}} | ||
| + | }} | ||
| + | {{ #if:{{{column9tag|}}} | | ||
| + | {{!}} {{ #if:{{{column9link|}}} | | ||
| + | [[{{{{{{column9tag|}}}}}}]] | {{{{{{column9tag|}}}}}} | ||
| + | }} }} }} }} }} }} }} }} }} }} | ||
| + | {{!}} [[File:OGFmapicon.png|18px|link=]] <span class="plainlinks">[https://opengeofiction.net/{{{type}}}/{{{{{{type}}}_id}}} map]</span> | ||
{{!}}- | {{!}}- | ||
| − | }} |} | + | }} |} |
| + | {{#clear_external_data:}} | ||
{{#clear_external_data:}} |} | {{#clear_external_data:}} |} | ||
Revision as of 00:44, 3 August 2022
Useful links
- Hilfe:Tabellen
- Template:MER-autoTable rfrsh
- Template:Table_rel
- Template:Table_opq
- Template:Rel_data
- Template:Opq_data
- Template:Table_fill
Simple tables
| A | B | C |
|---|---|---|
| aaaaaaa | bbbbbbbbbbbbbbb | ccccccccccc |
| A | B | C |
|---|---|---|
| aaaaaaa | bbbbbbbbbbbbbbb | ccccccccccc |
| Table | |
|---|---|
| Map |
|}
Requesting data
Minimal example 1: use a relation
{{#clear_external_data:}}{{#get_web_data:url=https://opengeofiction.net/api/0.6/relation/312195/full
|format=xml
|data=
way_id=/osm/way/@id
,name=/osm/way/tag[@k='name']/@v
|use xpath
}}
{| class="wikitable"
! Nane
! Link
{{!}}-
{{#for_external_table:<nowiki/>
{{!}}{{{name}}}
{{!}}[http://opengeofiction.net/way/{{{way_id}}} click here]
{{!}}-
}} |}
{{#clear_external_data:}}
| Name | Link |
|---|---|
| Teststraße 1 | click here |
| Teststraße 2 | click here |
| Teststraße 3 | click here |
| Teststraße 4 | click here |
| Teststraße 5 | click here |
| Teststraße 6 | click here |
| Teststraße 7 | click here |
| Teststraße 8 | click here |
Minimal example 2: use an overpass querry
{| {{#clear_external_data:}}
{{#get_web_data:url=https://ogfoverpass.rent-a-planet.com/api/interpreter?data=%28node%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3Bway%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3Brelation%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3B%29%3Bout%20body%3B%3E%3Bout%20skel%20qt%3B
|format=xml
|data=
way_id=/osm/way/@id
,name=/osm/way/tag[@k='name']/@v
|use xpath
}}
{| class="wikitable"
! Nane
! Link
{{!}}-
{{#for_external_table:<nowiki/>
{{!}}{{{name}}}
{{!}}[http://opengeofiction.net/way/{{{way_id}}} click here]
{{!}}-
}} |}
{{#clear_external_data:}} |}
Error while fetching data from URL https://ogfoverpass.rent-a-planet.com/api/interpreter?data=%28node%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3Bway%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3Brelation%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3B%29%3Bout%20body%3B%3E%3Bout%20skel%20qt%3B: $2.Error fetching URL: Could not resolve host: ogfoverpass.rent-a-planet.com
There was a problem during the HTTP request: 0 Error
Could not get URL https://ogfoverpass.rent-a-planet.com/api/interpreter?data=%28node%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3Bway%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3Brelation%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3B%29%3Bout%20body%3B%3E%3Bout%20skel%20qt%3B after 3 tries.
| Nane | Link |
|---|
Test subtemplates
| Name | Link |
|---|---|
| Teststraße 1 | click here |
| Teststraße 2 | click here |
| Teststraße 3 | click here |
| Teststraße 4 | click here |
| Teststraße 5 | click here |
| Teststraße 6 | click here |
| Teststraße 7 | click here |
| Teststraße 8 | click here |
Table
| Table | |
|---|---|
| Map |
x
| Rivers in Mergania: nodes | |
|---|---|
| Name | Map |
| Rivers in Mergania: ways | |
|---|---|
| Name | Map |
| Farau Way | |
| Farau Way |
| Rivers in Mergania: relations | |
|---|---|
| Name | Map |
| Farau Relation |
new relation
| Rivers in Mergania | |
|---|---|
| Name | Map |
| Rivers in Mergania | |
|---|---|
| Name | Map |
| Fluss z | |
| Bach y | |
| Fluss y | |
| Bach x | |
| Fluss x |
| Rivers in Mergania | |
|---|---|
| Name | Map |
| Fluss 1 | |
| Fluss 2 | |
| Bach 1 | |
| Rivers in Mergania |
Overpass testing
| Name | City | Map |
|---|