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 23:20, 4 August 2015 (created on nl WP, now translated to English). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)


Parameters

  • linktext mandatory: Text shown on outgoing link
  • id optional: can link to a Q-number of a wikidata item, if it isn't the Q-number id of the calling page is used
    • It is allowed to use more than 1 Wikidata item. This enables a preprocessing step by another Lua script which fetches several objects to visualize them on a map
  • coord optional: coordinates and a zoom factor in this format: C=47.0618984;15.4370248;17
  • prim optional: specifies to only fetch node, way or relation primitives
  • query optional: makes it possible to extend the query, which can be used to limit the search to highways or tombstones

Test values Module:OSM

Command Expected result Pass/Fail Result
OSM-objects with names referring to items
{{#invoke:OSM|etym|linktext=Kaart}} Kaart fail [1]
Call from a page without a wikidata item
{{#invoke:OSM|wd|linktext=No result}} This page doesn't have a wikidata entry Pass This page doesn't have a wikidata entry
several wikidata items
{{#invoke:OSM|wd|linktext=Vresse and Florenville|id=Q650206;Q713300}} Vresse and Florenville fail [2]
with coordinates, which means the search is restricted to a smaller area.
{{#invoke:OSM|wd|linktext=Church of Vresse|id=Q20748715|coord=49.71513;5.23446;14}} Kerk van Vresse fail [3]

Usage

{{#invoke:OSM|function_name}}