Template:Osm-query2

From OpenStreetMap Wiki
Jump to navigation Jump to search

[ dead link ]

map: {{{key}}}={{{value}}}


[Edit] [Purge] Template-info.svg Template documentation

Broken

This template is using no longer working service, see https://help.openstreetmap.org/questions/83146/contact-user-thedj-if-you-want-maintain-osmdb and https://phabricator.wikimedia.org/T187601

Documentation

Note: This template replaces the Template:Osm-query, which was designed for the first versions of Query-to-map. The now used mapnik-database is incompatible and it is necessary to use this new template.

This template requests points-, lines- and areas-object-types by the query2map software tool running on Wikimedia Toolforge and displays them on a map, which can be combined with a list of the selected objects. It's possible to ask for a name and/or any key/value pair in combination with a bounding box. Following parameters can be used:

Inputparameter

  • name= name of the relation, way, node or area (should have the same result as provided by the Template:Osm-query-name)
  • key= name of the asked key.
  • value= value of the asked key


Outputparameter

  • types= points (node), lines (relation and way) and areas (if left blank:"points-lines-areas")
  • list= if a list is requested by using "yes", then a list of the selected objects is shown in addition to the map (if left blank:"no"). This parameter has no effect (empty list) if relations are requested.
  • bbox= bounding box (mandatory)
  • desc= Output description in the wiki (if left blank, the name-parameter will be used as description; if it is blank as well, the key-parameter and value-parameter will be used). In any case the prefix "map" or "list/map" will be added by the template, which depends on the list-parameter.


Empty complete template

You can also use short forms. See examples below.

{{osm-query2
 |name=
 |key=
 |value=
 |types=
 |list=
 |bbox=
 |desc=
 }} 

Examples

Example way with list-output

{{osm-query2
 |key=tree_lined
 |value=yes
 |list=yes
 |bbox=7.1,50.8,7.2,50.95
 |desc=Tree lined street near Lohmar
 }} 

Result: [ dead link ]


Result if desc is blank: [ dead link ]


Example way

{{osm-query2
 |name=Bahntrassenradweg Bergisch Born - Marienheide
 |types=lines
 |bbox= 7.25,51.07,7.54,51.17
 }}  

Result: [ dead link ]



Example way combined with a filter key/value and list

The list has only one value because the object is selected by unique name

{{osm-query2
 |name=Bahntrassenradweg Bergisch Born - Marienheide
 |key=railway
 |value=abandoned
 |types=lines
 |list=yes
 |bbox= 7.25,51.07,7.54,51.17
 |desc=Rail Trail Bergisch Born - Marienheide only abandoned railway
 }}  

Result: [ dead link ]



Example relation plus points

{{osm-query2
 |key=network
 |value=VRS
 |types=lines-points
 |bbox= 7.2,50.8,7.6,51.0
 |desc=public transport network vrs
 }}  

Result: [ dead link ]


Example nodes

{{osm-query2
 |key=amenity
 |value=restaurant
 |types=points
 |list=yes
 |bbox= 7.15,50.86,7.25,50.88
 |desc=Restaurants
 }}  

Result: [ dead link ]



Example areas

{{osm-query2
 |key=building
 |value=yes
 |types=areas
 |list=yes
 |bbox= 7.15,50.86,7.25,50.88
 }}  

Result: [ dead link ]