Module:OSM/doc: Difference between revisions
Appearance
Content deleted Content added
add doc for timeout value |
added a new method and the possiblity to define a MapCSS style |
||
Line 3: | Line 3: | ||
== Usage == |
== Usage == |
||
* Search Openstreetmap independently of wikidata tags |
|||
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''overpass''}} |
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''overpass''}} |
||
* Search Openstreetmap |
* Search Openstreetmap for items which have wikidata=Q.... |
||
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''wd''}} |
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''wd''}} |
||
* Search Openstreetmap for items which have wikidata=Q.... |
* Search Openstreetmap for items which have name:etymology:wikidata=Q.... |
||
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''etym''}} |
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''etym''}} |
||
* Search Openstreetmap for items which have |
* Search Openstreetmap for items which have subject:wikidata=Q.... |
||
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''subject''}} |
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''subject''}} |
||
* Search Openstreetmap for items which have |
* Search Openstreetmap for items which have artist:wikidata=Q.... |
||
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''artist''}} |
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''artist''}} |
||
* Search Openstreetmap for items which have architect:wikidata=Q.... |
|||
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''architect''}} |
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''architect''}} |
||
* Search Openstreetmap for items which have operator:wikidata=Q.... |
|||
⚫ | |||
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''operator''}} |
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''operator''}} |
||
* Search Openstreetmap for items which have brand:wikidata=Q.... |
|||
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''brand''}} |
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''brand''}} |
||
* Search Openstreetmap for public transport lines related to the current article |
|||
⚫ | |||
===Parameters=== |
===Parameters=== |
||
Line 28: | Line 33: | ||
* limitToBBOX: defaults to yes. If coord is set the query is limited to the resulting bbox |
* limitToBBOX: defaults to yes. If coord is set the query is limited to the resulting bbox |
||
* run : defaults to yes. Use no if you want the user to be able to move the map or change the query before searching |
* run : defaults to yes. Use no if you want the user to be able to move the map or change the query before searching |
||
* style : it's possible to define a MapCSS style to presenet the result in a nicer way |
|||
== Test values == |
== Test values == |
Revision as of 06:43, 15 August 2015
Usage
- Search Openstreetmap independently of wikidata tags
{{#invoke:OSM|overpass}}
- Search Openstreetmap for items which have wikidata=Q....
{{#invoke:OSM|wd}}
- Search Openstreetmap for items which have name:etymology:wikidata=Q....
{{#invoke:OSM|etym}}
- Search Openstreetmap for items which have subject:wikidata=Q....
{{#invoke:OSM|subject}}
- Search Openstreetmap for items which have artist:wikidata=Q....
{{#invoke:OSM|artist}}
- Search Openstreetmap for items which have architect:wikidata=Q....
{{#invoke:OSM|architect}}
- Search Openstreetmap for items which have operator:wikidata=Q....
{{#invoke:OSM|operator}}
- Search Openstreetmap for items which have brand:wikidata=Q....
{{#invoke:OSM|brand}}
- Search Openstreetmap for public transport lines related to the current article
{{#invoke:OSM|pt}}
Parameters
- display : Text shown on outgoing link
- link : defaults to yes, but can be set to no for use in other templates
- timeout : defaults to 15 seconds, needs to be set higher for more complicated queries
- id : can link to a 1 or more Q-numbers of wikidata items, defaults to the Q-number id of the calling page
- query : makes it possible to extend the query, which can be used to limit the search to highways or tombstones
- prim : only fetch node, way and/or relation primitives
- coord : coordinates and a zoom factor in this format: 47.0618984;15.4370248;17 from which a bbox will be determined.
- limitToBBOX: defaults to yes. If coord is set the query is limited to the resulting bbox
- run : defaults to yes. Use no if you want the user to be able to move the map or change the query before searching
- style : it's possible to define a MapCSS style to presenet the result in a nicer way
Test values
1 of 10 tests failed.
test_brand
Text | Expected | Actual | |
---|---|---|---|
![]() |
{{#invoke:OSM|brand|id=Q3195848|display=Toon vestigingen op een kaart|style=node{ text: name; icon-image: url('https:/media/wikipedia/commons/0/07/Kewlox_logo.png'); icon-width: 32;} }} | Toon vestigingen op een kaart | Toon vestigingen op een kaart |
![]() |
{{#invoke:OSM|brand|id=Q3195848|display=Show locations on map}} | Show locations on map | Show locations on map |
test_etym
test_pt
Text | Expected | Actual | |
---|---|---|---|
![]() |
{{#invoke:OSM|pt|id=Q18012220|display=De Lijn 352 on map}} | De Lijn 352 on map | De Lijn 352 on map |
test_subject
Text | Expected | Actual | |
---|---|---|---|
![]() |
{{#invoke:OSM|subject|id=Q1356304|display=Statues of Ernest Claes|coord=51.1936;3.23812;18}} | Statues of Ernest Claes | Statues of Ernest Claes |
test_wd
Text | Expected | Actual | |
---|---|---|---|
![]() |
{{#invoke:OSM|wd|id=Q650206;Q713300|display=Vresse and Florenville}} | Vresse and Florenville | Vresse and Florenville |
![]() |
{{#invoke:OSM|wd|id=Q20748715|display=Church of Vresse|coord=49.71513;5.23446;14}} | Church of Vresse | Church of Vresse |
![]() |
{{#invoke:OSM|wd|id=Q1716059|prim=w|display=Cemetery of Arlon on a map}} | Cemetery of Arlon on a map | Cemetery of Arlon on a map |