imported>ChiEmpire |
imported>ChiEmpire |
第65行: |
第65行: |
| Yosemite National Park is located at <code>locator_x = 20</code> from the left of the image and <code>locator_y = 84</code> from the top. 您可以把這個示例原始碼貼在[[:Wikipedia:沙盒|沙盒]]並且試用其它數值測試。 | | Yosemite National Park is located at <code>locator_x = 20</code> from the left of the image and <code>locator_y = 84</code> from the top. 您可以把這個示例原始碼貼在[[:Wikipedia:沙盒|沙盒]]並且試用其它數值測試。 |
| {{clr}} | | {{clr}} |
|
| |
| ==== Automatic method ====
| |
|
| |
| A marker can be superimposed on one of a set of special map templates. If values for <code>locator_x</code> and <code>locator_y</code> are <u>not</u> specified and geographical coordinates are specified <u>without</u> the use of the {{tl|Coord}} template then a marker will be superimposed on the map selected from a set of map templates. These maps can be found at [[:Category:地理位置圖模板]]. All of the names begin with the words "Location map" followed by the area covered. The name you need to specify is the area name. The map template for the for Alberta, Canada is [[Template:Location map Canada Alberta|Location map Canada Alberta]]. In this case specify <code>map = Canada Alberta</code>. For example:
| |
|
| |
| {{Infobox protected area
| |
| | name = Dry Island Buffalo Jump Provincial Park
| |
| | iucn_category = III
| |
| | map = Canada Alberta
| |
| | map_caption = Map of Alberta, Canada
| |
| | map_width = 175
| |
| | location = [[Alberta, Canada|Alberta]], [[Canada]]
| |
| | nearest_city = [[Three Hills, Alberta|Three Hills]] and [[Red Deer, Alberta|Red Deer]]
| |
| | lat_d = 51.9438889
| |
| | long_d = -112.9636110
| |
| | region = CA
| |
| | area = {{convert|34.5|km2|sqmi|abbr=on}}
| |
| | established = December 15, 1970
| |
| | governing_body = [[Alberta Tourism, Parks, Recreation and Culture]]
| |
| | display = inline
| |
| }}
| |
| <pre style="font-size:90%; width:60%;">
| |
| {{Infobox protected area
| |
| | name = Dry Island Buffalo Jump Provincial Park
| |
| | iucn_category = III
| |
| | map = Canada Alberta
| |
| | map_caption = Map of Alberta, Canada
| |
| | map_width = 175
| |
| | location = [[Alberta, Canada|Alberta]], [[Canada]]
| |
| | nearest_city = [[Three Hills, Alberta|Three Hills]]
| |
| | lat_d = 51.9438889
| |
| | long_d = -112.9636110
| |
| | region = CA
| |
| | area = {{convert|34.5|km2|sqmi|abbr=on}}
| |
| | established = December 15, 1970
| |
| | governing_body = [[Alberta Tourism, Parks, Recreation and Culture]]
| |
| }}
| |
| </pre>
| |
|
| |
| The maps in this template set for large areas use [[equirectangular projection]]. Large scale maps look different using this projection than those with which most are familiar. Most maps use some other [[Map projection|method of projection]]. Compare the two maps bellow. The second uses equirectangular projection.
| |
|
| |
| <div style="float: left; margin-right: 20px">
| |
| [[File:US Locator Blank.svg|300px]]
| |
| </div>
| |
| <div style="float: left;">
| |
| [[File:USA location map.svg|300px]]
| |
| </div>
| |
| {{clr}}
| |
|
| |
| For technical reasons it is much easier for the template to use the second map. The distortion of the of the [[49th parallel north]] which defines most of the US–Canadian border can be clearly seen. If the first map were to be used the marker would not appear in the proper location. With maps of smaller areas this difference is less critical. If you want to use larger maps consider using the XY method.
| |
| {{clr}}
| |
| <!--
| |
| == Markers ==
| |
|
| |
| There are two optional fields not mentioned above. They are <code>marker</code> and <code>marker_size</code>. The default marker is red and has a size of 7 pixels. It is created by shrinking the image [[:file:Red_pog.svg|Red pog.svg]] to 7 pixels. Other images can be found on [[commons:Category:Map pointer|Wikimedia Commons]]. Since this is an encyclopedia users are advised to select appropriate markers only. For example to use a Green marker enter {{nowrap|<code><nowiki>marker = Green pog.svg</nowiki></code>}}. To make it a bit larger enter {{nowrap|<code><nowiki>marker_size = 9</nowiki></code>}}.
| |
| -->
| |
|
| |
|
| == Coordinate syntax == | | == Coordinate syntax == |