维基百科:Map data
![]() | Wikimedia Commons 地圖資料現在已可以使用創用CC授權條款(CC-BY、CC-BY-SA)授權(以前只允許CC0) |
使用地圖資料作為前綴來儲存GeoJSON地圖。
入門
GeoJSON map data cannot be directly uploaded and stored in the File namespace. While map data should usually be stored on Commons (see mw:Help:Map data), until August 2018 only CC0 licences were not allowed. Because of this former restriction, this process was set up so that data with licences compatible with Wikipedia's CC-BY-SA-3.0 licencing (e.g. as CC-BY licences), they could be stored as subpages here on Wikipedia.
Storing data on Wikipedia subpages can allow the same data to be used in multiple articles with different features given prominent styling depending on the article title. For example, Wikipedia:Map data/Columbus Register of Historic Properties uses parser functions such as "stroke": {{#ifeq:{{PAGENAME}}|Old Oaks Historic District|"#ff0000"|"#666666"}}
.
如何貢獻
Created a subpage of this page. It should probably follow the convention used on Commons of /data source/title. At the start of the page, in a <noinclude>...</noinclude>
section, include the {{information}} and licencing templates.
使用User:Evad37/kmlToJson可以將KML檔案轉換成GeoJSON。
如果使用轉換器輸出GeoJSON,請確保雙引號在正確的位置,範例:
"stroke": {{#ifeq:{{PAGENAME}}|Foo|"#ff0000"|"#666666"}}
而不是
"stroke": "{{#ifeq:{{PAGENAME}}|Foo|#ff0000|#666666}}"
顯示地圖資料
使用模板{{Mapbox}}
或{{Maplink}}
(並將|raw={{Wikipedia:地圖資料/子頁面}}
)
參見
- 前綴為地圖資料的子頁面
- {{Attached KML}} – KML data is similarly stored in subpages