Develop auto tables
Revision as of 01:39, 1 August 2022 by Admin (talk | contribs) (→Minimal example 2: use an overpass querry)
Useful links
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 |
|---|
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 |
|---|