Template:OSM/doc
此頁面是Template:OSM的Template文档。 此頁面可能包含了模板的使用說明、分類和其他内容。 |
Use for consistent linking to OpenStreetMap, particularly for grouped relationship illustrated a route, or place.
获取来自OSM的数据ID
编辑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
编辑- Go to 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}} |
OpenStreetMap上有關164711 |
{{OSM|n|746952719}} |
OpenStreetMap上有關746952719 OSM/doc的地理信息 |
{{OSM|r|1247233}} |
OpenStreetMap上有關1247233 OSM/doc的地理信息 |
Specify the object type and id in the template. n=node, w=way, r=relationship
Examples
编辑{{OSM|n|123456}}
produces OpenStreetMap上有關123456 OSM/doc的地理信息.{{OSM|n|123456|Part of Holstraat}}
produces OpenStreetMap上有關123456 Part of Holstraat的地理信息.{{OSM|w|28730330}}
produces OpenStreetMap上有關28730330 OSM/doc的地理信息.{{OSM|w|28730330|Holstraat}}
produces OpenStreetMap上有關28730330 Holstraat的地理信息.{{OSM|r|2345}}
produces OpenStreetMap上有關2345 OSM/doc的地理信息.{{OSM|r|2345|Promenade}}
produces OpenStreetMap上有關2345 Promenade的地理信息.{{OSM|r|2345|tools=no}}
produces OpenStreetMap上有關2345 OSM/doc的地理信息.{{OSM|r|2345|tools=short}}
produces OpenStreetMap上有關2345 OSM/doc的地理信息.
参见
编辑