Шаблон:OSM
OSM on OpenStreetMap
![{{i}}](http://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Test_Template_Info-Icon.svg/50px-Test_Template_Info-Icon.svg.png)
Шаблон використовується для послідовного зв’язування з OpenStreetMap, особливо для згрупованих зв’язків, які ілюструють маршрут або місце.
Getting data id from OSM
[ред. код]OSM data consists of nodes (points), ways (lines) and relations (group of points or ways). Each of these data types have a unique id which can be used to reference the particular data. You can find the id of the data you are looking for by either using nominatim or the OSM data explorer.
Using nominatim
[ред. код]- Goto http://nominatim.openstreetmap.org/
- Search
- From the search results on the left, click the details link
Using OSM data explorer
[ред. код]- Goto http://osm.org
- Browse and zoom to the area which has the data
- Expand the map options tab ( blue '+' on the top right of the map and click on 'data')
- A list of objects in the map area should load on the right, select any feature from the map or list and click the detals link to get the id
Usage
[ред. код]Use | Output |
---|---|
{{OSM|relation=164711}} | 164711 |
{{OSM|n|746952719}} | 746952719 OSM on OpenStreetMap |
{{OSM|r|1247233}} | 1247233 OSM on OpenStreetMap |
Specify the object type and id in the template. n=node, w=way, r=relationship
Examples
[ред. код]{{OSM|n|123456}}
produces 123456 OSM on OpenStreetMap.{{OSM|n|123456|Part of Holstraat}}
produces 123456 Part of Holstraat on OpenStreetMap.{{OSM|w|28730330}}
produces 28730330 OSM on OpenStreetMap.{{OSM|w|28730330|Holstraat}}
produces 28730330 Holstraat on OpenStreetMap.{{OSM|r|2345}}
produces 2345 OSM on OpenStreetMap.{{OSM|r|2345|Promenade}}
produces 2345 Promenade on OpenStreetMap.{{OSM|r|2345|tools=no}}
produces 2345 OSM on OpenStreetMap.{{OSM|r|2345|tools=short}}
produces 2345 OSM on OpenStreetMap.
Див. також
[ред. код] Документація вище включена з Шаблон:OSM/документація. (ред. | історія) Дописувачі можуть експериментувати на підсторінках пісочниця (створити | дзеркало) та тести (створити) цього шаблону. Будь ласка, додавайте категорії до підсторінки /документація. Підсторінки цього шаблону. |