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

Content deleted Content added
update documentation and add example using Template:Location map+
update documentation, examples, see also
Line 12:
 
== Map definition ==
* <tt>'''name''' = {{{{BASEPAGENAME}}|name}}</tt>
; name
*: Name used in the default map caption (<tt>{{{{BASEPAGENAME}}|name}}</tt>)
 
; image
: the default map* <tt>'''image,''' without= "Image:" or "File:" (<tt>[[:File:{{{{BASEPAGENAME}}|image}}|{{{{BASEPAGENAME}}|image}}]]</tt>)
*: The default map image, without "Image:" or "File:"
; image1
 
:* an alternative map image, usually a relief map (<tt>'''image1''' = [[:File:{{{{BASEPAGENAME}}|image1}}|{{{{BASEPAGENAME}}|image1}}]]</tt>)
; x
*: An alternative map image, usually a relief map, can be displayed via the ''relief'' or ''AlternativeMap'' parameters
: 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
{{#if:{{{{BASEPAGENAME}}|image2}}|
; 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
* <tt>'''image2''' = [[:File:{{{{BASEPAGENAME}}|image2}}|{{{{BASEPAGENAME}}|image2}}]]</tt>
*: A second alternative map image, can be displayed via the ''AlternativeMap'' parameter only
}}{{#if:{{{{BASEPAGENAME}}|top}}{{{{BASEPAGENAME}}|bottom}}{{{{BASEPAGENAME}}|left}}{{{{BASEPAGENAME}}|right}}|
 
* <tt>'''top''' = {{{{BASEPAGENAME}}|top}}</tt>
*: [[Latitude]] at top edge of map, in [[decimal degrees]]
 
* <tt>'''bottom''' = {{{{BASEPAGENAME}}|bottom}}</tt>
*: Latitude at bottom edge of map, in decimal degrees
 
* <tt>'''left''' = {{{{BASEPAGENAME}}|left}}</tt>
*: [[Longitude]] at left edge of map, in decimal degrees
 
* <tt>'''right''' = {{{{BASEPAGENAME}}|right}}</tt>
*: Longitude at right edge of map, in decimal degrees
}}{{#if:{{{{BASEPAGENAME}}|x}}{{{{BASEPAGENAME}}|y}}|
 
* <tt>'''x''' = {{{{BASEPAGENAME}}|x}}</tt>
*: anAn expression to calculate a ___location on the map via its [[longitude]]; evaluates as 0 along the left edge and 100 along the right edge
 
* <tt>'''y''' = {{{{BASEPAGENAME}}|y}}</tt>
*: anAn 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 abovedefined as '''image1''' (<tt>{{{{BASEPAGENAME}}|image1}}</tt>) can be displayed by using the ''AlternativeMaprelief'' or ''reliefAlternativeMap'' parameters in {{tl|Location map}}, {{tl|Location map many}} and {{tl|Location map+}}. Further{{#if:{{{{BASEPAGENAME}}|image2}}| instructionsThe map defined as '''image2''' (<tt>{{{{BASEPAGENAME}}|image2}}</tt>) can only be founddisplayed atby [[Template:Locationusing map#Usingthe Alternative''AlternativeMap'' Map]]parameter.}} andThe [[Template:Locationuse map#Relief]],of orthese seetwo parameters is shown in the examples below. Additional examples can be found at:
{|
|
* [[Template:Location map#Relief manyparameter]]
* [[Template:Location map#AlternativeMap parameter]]
|
* [[Template:Location map+/relief]]
* [[Template:Location map+/AlternativeMap]]
}|}
 
== Examples using ___location map templates ==
 
== Examples ==
=== Location map, using default map (image) ===
{{Location map | China
| width = 250
| lat lat_deg = 37
| long lon_deg = 100
| label = Qinghai Lake
| marksize = 6
}}
<pre style="width:30em">
{{Location map | China
| width = 250
| lat lat_deg = 37
| long lon_deg = 100
| label = Qinghai Lake
| marksize = 6
}}
</pre>
{{clear}}
 
=== Location map many, using relief map (image1) ===
{{Location map | China
| relief = yes
| width = 250
| lat = 37
| long = 100
| label = Qinghai Lake
| marksize = 6
}}
<pre style="width:30em">
{{Location map | China
| relief = yes
| width = 250
| lat = 37
| long = 100
| label = Qinghai Lake
| marksize = 6
}}
</pre>
{{clear}}
 
=== Location map many, using default map ===
{{Location map many | China
| relief = yes
| caption = People's Republic of China
| width = 250
| latcaption = People's Republic =of 39.91China
| long lat1_deg = 11639.3991
| label lon1_deg = Beijing116.39
| lat2 label1 = 31.2Beijing
| long2 lat2_deg = 12131.52
| label2 lon2_deg = Shanghai121.5
| label2 = Shanghai
}}
<pre style="width:30em">
{{Location map many | China
| lat relief = 37yes
| caption = People's Republic of China
| width = 250
| latcaption = People's Republic =of 39.91China
| long lat1_deg = 11639.3991
| label lon1_deg = Beijing116.39
| lat2 label1 = 31.2Beijing
| long2 lat2_deg = 12131.52
| label2 lon2_deg = Shanghai121.5
| label2 = Shanghai
}}
</pre>
Line 95 ⟶ 106:
{{Location map+ | China
| AlternativeMap = China edcp relief ___location map.jpg
| caption = People's Republic of China
| width = 250
| caption = People's Republic of China
| places =
{{Location map~ | China
| lat lat_deg = 39.91
| long lon_deg = 116.39
| label = Beijing
}}
{{Location map~ | China
| lat lat_deg = 31.2
| long lon_deg = 121.5
| label = Shanghai
}}
}}
Line 112 ⟶ 123:
{{Location map+ | China
| AlternativeMap = China edcp relief ___location map.jpg
| caption = People's Republic of China
| width = 250
| caption = People's Republic of China
| places =
{{Location map~ | China
| lat lat_deg = 39.91
| long lon_deg = 116.39
| label = Beijing
}}
{{Location map~ | China
| lat lat_deg = 31.2
| long lon_deg = 121.5
| label = Shanghai
}}
}}
Line 130 ⟶ 141:
 
== See also ==
* [[Template:Location map China relief]], displays the relief map shown above (for [[Help:Infobox|infoboxes]] that do not support alternative maps)
* [[Template:Location map]]
* [[Template:Location map+ China (equirectangular)]], displays a different map with different border coordinates
 
* [[Template:Location map many]]
*; [[Template:Location map China (equirectangular)]]templates
* [[Template:Location map China relief]], to display one mark and label using latitude and longitude
* [[Template:Location map many]], to display up to nine marks and labels
* [[Template:Location map+]], to display an unlimited number of marks and labels
 
; Infobox templates incorporating (passing values to) the Location map template
{{Location map/doc/See also infobox templates}}
<includeonly>
<!-- Categories and interwikis go here: -->