Jump to content

Module:OSM/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Polyglot (talk | contribs) at 17:18, 14 August 2015 (add doc for timeout value). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


Usage

{{#invoke:OSM|overpass}}
  • Search Openstreetmap independently of wikidata tags
{{#invoke:OSM|wd}}
  • Search Openstreetmap for items which have wikidata=Q....
{{#invoke:OSM|etym}}
  • Search Openstreetmap for items which have name:etymology:wikidata=Q....
{{#invoke:OSM|subject}}
  • Search Openstreetmap for items which have subject:wikidata=Q....
{{#invoke:OSM|artist}}
{{#invoke:OSM|architect}}
{{#invoke:OSM|subject}}
{{#invoke:OSM|operator}}
{{#invoke:OSM|brand}}

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

Test values

1 of 10 tests failed.

test_brand

test_brand
Text Expected Actual
checkY {{#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
checkY {{#invoke:OSM|brand|id=Q3195848|display=Show locations on map}} Show locations on map Show locations on map

test_etym

test_etym
Text Expected Actual
checkY {{#invoke:OSM|etym|id=Q2360250|display=Map}} Map Map
☒N {{#invoke:OSM|etym|id=Q118958|display=Streets named after Leuven|query=[highway]|timeout=50|coord=50.879;4.701;9}} Streets named after Leuven Streets named after Leuven
checkY {{#invoke:OSM|etym|id=Q13104397|link=no|display=Show avenue named after Numa Ensch Tesch on Openstreetmap}} http://overpass-turbo.eu/?Q=%5Btimeout%3A20%5D%5Bout%3Ajson%5D%3B%0A%28%0Anode%5B%22name%3Aetymology%3Awikidata%22~%22%28%5E%7C%3B%29%28Q13104397%29%28%3B%7C%24%29%22%5D%3B%0Away%5B%22name%3Aetymology%3Awikidata%22~%22%28%5E%7C%3B%29%28Q13104397%29%28%3B%7C%24%29%22%5D%3B%0Arelation%5B%22name%3Aetymology%3Awikidata%22~%22%28%5E%7C%3B%29%28Q13104397%29%28%3B%7C%24%29%22%5D%3B%0A%3E%3E%3B%0A%29%3B%0Aout%20geom%3B%0A%7B%7Bstyle%3A%0Anode%20%5Bname%3Aetymology%3Awikidata%5D%7B%0A%20%20text%3A%20name%3B%0A%20%20icon-width%3A%2032%3B%7D%0A%7D%7D%0A&R http://overpass-turbo.eu/?Q=%5Btimeout%3A20%5D%5Bout%3Ajson%5D%3B%0A%28%0Anode%5B%22name%3Aetymology%3Awikidata%22~%22%28%5E%7C%3B%29%28Q13104397%29%28%3B%7C%24%29%22%5D%3B%0Away%5B%22name%3Aetymology%3Awikidata%22~%22%28%5E%7C%3B%29%28Q13104397%29%28%3B%7C%24%29%22%5D%3B%0Arelation%5B%22name%3Aetymology%3Awikidata%22~%22%28%5E%7C%3B%29%28Q13104397%29%28%3B%7C%24%29%22%5D%3B%0A%3E%3E%3B%0A%29%3B%0Aout%20geom%3B%0A%7B%7Bstyle%3A%0Anode%20%5Bname%3Aetymology%3Awikidata%5D%7B%0A%20%20text%3A%20name%3B%0A%20%20icon-width%3A%2032%3B%7D%0A%7D%7D%0A&R

test_pt

test_pt
Text Expected Actual
checkY {{#invoke:OSM|pt|id=Q18012220|display=De Lijn 352 on map}} De Lijn 352 on map De Lijn 352 on map

test_subject

test_subject
Text Expected Actual
checkY {{#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

test_wd
Text Expected Actual
checkY {{#invoke:OSM|wd|id=Q650206;Q713300|display=Vresse and Florenville}} Vresse and Florenville Vresse and Florenville
checkY {{#invoke:OSM|wd|id=Q20748715|display=Church of Vresse|coord=49.71513;5.23446;14}} Church of Vresse Church of Vresse
checkY {{#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