Jump to content

Module:Location map/data/China/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
add example using Template:Location map many
update documentation and add example using Template:Location map+
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- Categories and interwikis go at the bottom of this page. -->
<!-- Categories and interwikis go at the bottom of this page. -->

'''Template:Location map China''' is a location map definition used to overlay markers and labels on an [[equidistant conic projection]] map of [[People's Republic of China|China]]. The markers are placed by [[latitude]] and [[longitude]] coordinates on the default map or a similar map image.


== Usage ==
== Usage ==
These definitions are used by the following templates when invoked with parameter "China":
See {{tl|Location map}} for details concerning usage.
* {{tlx|Location map | China&nbsp;| ...}}
* {{tlx|Location map many | China&nbsp;| ...}}
* {{tlx|Location map+ | China&nbsp;| ...}}
* {{tlx|Location map~ | China&nbsp;| ...}}

== Map definition ==
; name
: used in default map caption (<tt>{{{{BASEPAGENAME}}|name}}</tt>)
; image
: the default map image, without "Image:" or "File:" (<tt>[[:File:{{{{BASEPAGENAME}}|image}}|{{{{BASEPAGENAME}}|image}}]]</tt>)
; image1
: an alternative map image, usually a relief map (<tt>[[:File:{{{{BASEPAGENAME}}|image1}}|{{{{BASEPAGENAME}}|image1}}]]</tt>)
; x
: an expression to calculate a location on the map via its [[longitude]]; evaluates as 0 along the left edge and 100 along the right edge
; y
: an expression to calculate a location on the map via its [[latitude]]; evaluates as 0 along the top edge and 100 along the bottom edge


== How to use an alternative map ==
== Alternative map ==
The map shown above as '''image1''' (<tt>{{{{BASEPAGENAME}}|image1}}</tt>) can be displayed by using the ''AlternativeMap'' or ''relief'' parameters in {{tl|Location map}}, {{tl|Location map many}} and {{tl|Location map+}}. Further instructions can be found at [[Template:Location map#Using Alternative Map]] and [[Template:Location map#Relief]], or see the examples below.
This template normally displays the map shown above as '''image''':
*<tt>{{{{BASEPAGENAME}}|image}}</tt>.
The ''AlternativeMap'' or ''relief'' parameters in {{tl|Location map}} can be used to display the map shown above as '''image1''':
*<tt>{{{{BASEPAGENAME}}|image1}}</tt>.
Further instructions and examples can be found at [[Template:Location map#Using Alternative Map]] and [[Template:Location map#Relief]].


== Examples ==
== Examples ==
Line 74: Line 88:
| long2 = 121.5
| long2 = 121.5
| label2 = Shanghai
| label2 = Shanghai
}}
</pre>
{{clear}}

=== Location map+, using AlternativeMap ===
{{Location map+ | China
| AlternativeMap = China edcp relief location map.jpg
| caption = People's Republic of China
| width = 250
| places =
{{Location map~ | China
| lat = 39.91
| long = 116.39
| label = Beijing
}}
{{Location map~ | China
| lat = 31.2
| long = 121.5
| label = Shanghai
}}
}}
<pre style="width:35em">
{{Location map+ | China
| AlternativeMap = China edcp relief location map.jpg
| caption = People's Republic of China
| width = 250
| places =
{{Location map~ | China
| lat = 39.91
| long = 116.39
| label = Beijing
}}
{{Location map~ | China
| lat = 31.2
| long = 121.5
| label = Shanghai
}}
}}
}}
</pre>
</pre>
Line 79: Line 130:


== See also ==
== See also ==
* [[Template:Location map]]
* [[Template:Location map+]]
* [[Template:Location map many]]
* [[Template:Location map many]]
* [[Template:Location map China (equirectangular)]]
* [[Template:Location map China (equirectangular)]]

Revision as of 09:53, 11 August 2011

Template:Location map China is a location map definition used to overlay markers and labels on an equidistant conic projection map of China. The markers are placed by latitude and longitude coordinates on the default map or a similar map image.

Usage

These definitions are used by the following templates when invoked with parameter "China":

Map definition

name
used in default map caption (Template:Location map/data/China)
image
the default map image, without "Image:" or "File:" ([[:File:Template:Location map/data/China|Template:Location map/data/China]])
image1
an alternative map image, usually a relief map ([[:File:Template:Location map/data/China|Template:Location map/data/China]])
x
an expression to calculate a location on the map via its longitude; evaluates as 0 along the left edge and 100 along the right edge
y
an expression to calculate a location on the map via its latitude; evaluates as 0 along the top edge and 100 along the bottom edge

Alternative map

The map shown above as image1 (Template:Location map/data/China) can be displayed by using the AlternativeMap or relief parameters in {{Location map}}, {{Location map many}} and {{Location map+}}. Further instructions can be found at Template:Location map#Using Alternative Map and Template:Location map#Relief, or see the examples below.

Examples

Location map, using default map (image)

Qinghai Lake is located in China
Qinghai Lake
Qinghai Lake
Qinghai Lake (China)
{{Location map | China
| width  = 250
| lat    = 37
| long   = 100
| label  = Qinghai Lake
| marksize = 6
}}

Location map, using relief map (image1)

Qinghai Lake is located in China
Qinghai Lake
Qinghai Lake
Qinghai Lake (China)
{{Location map | China
| relief = yes
| width  = 250
| lat    = 37
| long   = 100
| label  = Qinghai Lake
| marksize = 6
}}

Location map many, using default map

Location map/data/China/doc is located in China
Beijing
Beijing
Shanghai
Shanghai
People's Republic of China
{{Location map many | China
| caption = People's Republic of China
| width   = 250
| lat     = 39.91
| long    = 116.39
| label   = Beijing
| lat2    = 31.2
| long2   = 121.5
| label2  = Shanghai
}}

Location map+, using AlternativeMap

Location map/data/China/doc is located in China
Beijing
Beijing
Shanghai
Shanghai
People's Republic of China
{{Location map+ | China
| AlternativeMap = China edcp relief location map.jpg
| caption = People's Republic of China
| width   = 250
| places  =
  {{Location map~ | China
  | lat   = 39.91
  | long  = 116.39
  | label = Beijing
  }}
  {{Location map~ | China
  | lat   = 31.2
  | long  = 121.5
  | label = Shanghai
  }}
}}

See also