:Maplink/설명문서

IT 위키

스크립트 오류: "" 모듈이 없습니다.

<templatestyles src="Module:Message box/ombox.css"></templatestyles>

<templatestyles src="Module:Side box/styles.css"></templatestyles>

<templatestyles src="Module:Side box/styles.css"></templatestyles>

이 틀은 오픈스트리트맵의 지도 상에 표시된 특정 데이터를 링크나 지도칸의 형태로 문서에 삽입한 틀입니다. 지도를 클릭하면 전체화면으로 전환되어 스크롤과 확대축소가 가능하며 세부적인 지도와 데이터를 볼 수 있습니다. 이 틀에서 다룰 수 있는 지도 데이터는 다음과 같습니다.

  • 위키백과나 위키미디어 공용에서 GeoJSON 포맷으로 등록된 데이터
  • 오픈스트리트맵에 등록된 경로/다각형 지물
  • 변수 입력 / 위키데이터에서 불러온 좌표
  • 다른 페이지에 삽입된 채로 불러온 GeoJSON 데이터

주의사항은 다음과 같습니다.

  • 다루는 데이터가 크고 불러오기 무거운 지도라면 이 틀을 쓰는 대신 확장태그인 mapframe를 직접 삽입하여야 합니다. 틀을 통해 태그를 호출할 시 지도 렌더링이 Lua 시간 기준으로 계산되므로, 시간초과 오류를 일으킬 수 있습니다.
  • GeoJSON 파일은 현재 위키백과 내 직접 업로드가 불가능합니다. 그 대신 위키미디어 공용에서 Data: 이름공간으로 시작하여 .map 확장자로 끝나는 문서를 생성하는 식으로 대체되고 있습니다. 이와 관련해서는 mw:Help:Map Data를 참고하세요.
  • 오픈스트리트맵 (OSM)의 지물을 불러오려면 해당되는 OSM 관계에 Wikidata 태그를 삽입하고 1~2일 정도 기다리면 사용할 수 있습니다. mw:Help:Extension:Kartographer#External_data, mw:Help:Extension:Kartographer/OSM를 참조해 주세요.



이 틀은 지도상의 선형이나 다각형 지물을 나타내기 위한 틀입니다. 구체적으로는 다음의 지물을 특정할 수 있습니다.

  • 도로
  • 하천이나 수로
  • 철도와 지하철 노선
  • 해로 (뱃길)
  • 항공로
  • 탐험 경로
  • 서식지 영역
  • 국가와 행정구역 등

이 틀은 좌표 등 지도상에 특정 표시를 하고자 할 때에도 활용할 수 있습니다.

사용법

[원본 편집]
기본 사용법
  • <maplink text="위키미디어 공용에 등록된 데이터 문서">{"properties":{"stroke-width":6,"stroke":"#ff0000","title":"Maplink/설명문서"},"type":"ExternalData","title":"ecos.fws.gov/Endangered habitat 58938/Plethodon neomexicanus.map","service":"page"}</maplink> (예시: Data:ecos.fws.gov/Endangered habitat 58938/Plethodon neomexicanus.map)
    {{maplink|from=}} (data 이름공간으로 된 .map 데이터 문서를 from= 변수에 적어주세요)
  • 틀:Maplink (예: 위키백과:지도 데이터/Northern North Island Volcanics)
    {{maplink|raw=}} (위키백과:지도 데이터의 하위문서로 등록된 GeoJSON 원본 데이터의 제목을 틀로 감싸 밝혀주세요)
  • <maplink text="오픈스트리트맵에 등록된 경계선이나 선형 지물">{"properties":{"stroke-width":6,"stroke":"#ff0000","title":"Maplink/설명문서"},"type":"ExternalData","service":"geoline","ids":"Q36929"}</maplink>
    {{maplink|type=line|id=}} (위키데이터 ID는 다른 문서의 위키데이터를 가져올 경우에만 필요)
  • <maplink text="오픈스트리트맵에 등록된 다각형 지물">{"properties":{"stroke-width":6,"stroke":"#ff0000","title":"Maplink/설명문서"},"type":"ExternalData","service":"geoshape","ids":"모듈:WikidataIB 3439번째 줄에서 Lua 오류: attempt to index field 'wikibase' (a nil value)."}</maplink>
    {{maplink|type=shape|id=}} (위키데이터 ID는 다른 문서의 위키데이터를 가져올 경우에만 필요)
  • <maplink text="오픈스트리트맵에 등록된 다각형 지물의 반전 형태">{"properties":{"stroke-width":6,"stroke":"#ff0000","title":"Maplink/설명문서"},"type":"ExternalData","service":"geomask","ids":"모듈:WikidataIB 3439번째 줄에서 Lua 오류: attempt to index field 'wikibase' (a nil value)."}</maplink>
    {{maplink|type=shape-inverse|id=}} (위키데이터 ID는 다른 문서의 위키데이터를 가져올 경우에만 필요)
  • 모듈:Mapframe 427번째 줄에서 Lua 오류: attempt to index upvalue 'wb' (a nil value).
    위키데이터에서 가져올 경우:
    {{maplink|type=point|id=}} (위키데이터 ID는 다른 문서의 위키데이터를 가져올 경우에만 필요)
    좌표를 직접 입력할 경우:
    {{maplink|type=point|coord=}} ({{좌표}} 틀 활용)
  • 모듈:Mapframe 301번째 줄에서 Lua 오류: bad argument #1 to 'gmatch' (string expected, got nil). (|name= 변수에 {{좌표}} 틀 입력)
    현재 문서를 기준으로 할 경우: {{maplink|type=named}} or {{maplink|type=named|from=#Section}}
    다 문서를 기준으로 할 경우: {{maplink|type=named|from=Other page}} or {{maplink|type=named|from=Other page#Section}}
  • 모듈:Mapframe 427번째 줄에서 Lua 오류: attempt to index upvalue 'wb' (a nil value).
    위키데이터에서 가져올 경우:
    {{maplink|type=circle|radius=|id=}} (위키데이터 ID는 다른 문서의 위키데이터를 가져올 경우에만 필요)
    좌표를 직접 입력할 경우:
    {{maplink|type=circle|radius=|coord=}} ({{좌표}} 틀 활용)
  • 지도칸으로 나타내고 싶다면 |frame=yes 변수를 삽입하세요.
    예시: {{maplink|frame=yes|frame-align=left|type=line|id=Q36929|text=지도칸 예시}}.
    <mapframe height="200" text="지도칸 예시" align="left" width="300">{"properties":{"stroke-width":6,"stroke":"#ff0000","title":"Maplink/설명문서"},"type":"ExternalData","service":"geoline","ids":"Q36929"}</mapframe>
  • 지도칸을 표시할 때 여러 변수를 추가로 사용해 맞춤형 지도를 만들 수 있습니다. 예컨대 |plain=yes를 쓰면 네모칸이 삭제됩니다.
    예시: {{maplink|frame=yes|frame-align=left|plain=yes|type=line|id={{get QID|종로구}}|frame-width=200|frame-height=250|frame-long=126.979378|frame-lat=37.572916|zoom=9}}.
    <mapframe zoom="9" frameless="1" align="left" height="250" latitude="37.572916" longitude="126.979378" width="200">{"properties":{"stroke-width":6,"stroke":"#ff0000","title":"Maplink/설명문서"},"type":"ExternalData","service":"geoline","ids":"모듈:WikidataIB 3439번째 줄에서 Lua 오류: attempt to index field 'wikibase' (a nil value)."}</mapframe>

Parameter set – data page

{{maplink
|display=
|from=
|zoom=
|text=
|icon=
}}

Parameter set – raw data

{{maplink
|display=
|raw= <!-- preferably {{Wikipedia:Map data/subpage}} -->
|zoom=
|text=
|icon=
}}

Parameter set – geoline/geoshape

{{maplink
|display=
|type=
|id=
|title=
|description=
|stroke-color=
|stroke-width=
|zoom=
|text=
|icon=
}}

Parameter set – point features/coordinates

{{maplink
|display=
|type=point
|id=
|title=
|description=
|coord=
|marker=
|zoom=
|text=
|icon=
}}


Parameter set – circles

{{maplink
|display=
|type=circle
|radius=  <!-- in metres, alternative parameters available for other units --> 
|id=
|title=
|description=
|coord=
|marker=
|zoom=
|text=
|icon=
}}
다음은 틀마법사, 시각편집기, 기타 도구에서 사용되는 이 틀의 틀데이터입니다.

Maplink의 틀데이터

<templatedata> {

   "format": "block",
   "description": "",
   "params": {}

} </templatedata>

인수 목록
인수 지정 내용 기본값 설명

이 틀은 이 틀이 부착된 문서에 아래의 분류를 적용합니다:

분류 설명

같이 보기

[원본 편집]