Mal:Kartposisjon+

Fra Wikipedia, den frie encyklopedi
Gå til: navigasjon, søk
Dokumentasjonsikon Maldokumentasjon[vis] [rediger] [historikk] [oppdater]

Mal:High-risk

Map of England showing the locations of towns and battles. Bosworth is in the centre, northwest of London.
<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">
<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">
<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">
Barnet

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">

Stoke

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">

Tewkesbury

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">

Berwick

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">

London

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">

York

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">

Plymouth

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">

Poole

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">

Wem

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">

Northumberland

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">

Shrewsbury

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">

Milford Haven
Battle icon active (crossed swords).svg Battle of Bosworth Field Battle icon (crossed swords).svg other battles

This template places one or more location marks on a map, with optional labels. It is in the same family of templates as the Location map template and the documentation for that template might be helpful.

This template uses a helper template, Location map~, one or more times to generate a mark for each location.

Usage[rediger | rediger kilde]

{{Location map+
| {{{1}}}
| width          =
| float          =
| border         =
| caption        =
| alt            =
| relief         =
| AlternativeMap =
| overlay_image  =
| places         =
}}
{{Location map~
| {{{1}}}
| label      =
| label_size =
| position   =
| background =
| mark       =
| marksize   =
| link       =
| lat_deg    =
| lat_min    =
| lat_sec    =
| lat_dir    =
| lon_deg    =
| lon_min    =
| lon_sec    =
| lon_dir    =
}}

Parameters[rediger | rediger kilde]

Parameters for Location map+
Parameter Description
{{{1}}} Required. Use the name of the map as the first unnamed parameter. For example, specify England to use the values in {{Location map England}}. See the examples below.
width Determines the width of the map in pixels, overriding any default values. Do not include px, for example: width=300, not width=300px.
default_width Determines the default width of the map in pixels, intended for use by templates e.g. place infoboxes. The default value is 240. Do not include px. This value will be multiplied by the defaultscale parameter specified in individual map templates, if it exists, in order to achieve an appropriate size for vertical maps. For example if default_width=200 is given, a map of Thailand will be displayed with a width of 200 * 0.57 = 114 pixels (as specified in Template:Location map Thailand).
float Specifies the position of the map on the page. Valid values are left, right, center and none. The default is right.
border Specifies the color of the 1px map border. The default is lightgrey (see web colors). If set to none, no border will be generated. This parameter is seldom used.
caption The text of a caption to be displayed below the map. Specifying a caption will cause the map to be displayed with a frame. If caption is defined but is not assigned a value, the map will not be framed and no caption will be displayed. If caption is not defined, the map will not be framed and a default caption will be generated. The default caption is created from the label parameter (or the current page name if label not defined) and the name parameter from map definition template. See the examples below.
alt Alt text for map; used by screen readers, see WP:ALT.
relief Any non-blank value (1, yes, etc.) will cause the template to display the map specified in the map definition template as image1, which is usually a relief map. See the example at Location map+/relief.
AlternativeMap Allows the use of an alternative map. The image must have the same edge coordinates as the location map template. See the example at Location map+/AlternativeMap.
overlay_image Allows an overlay to be superimposed on the map. This parameter is seldom used. See the example at Location map+/overlay.
places Specifies one or more place markers using Location map~.
Parameters for Location map~
Parameter Description
{{{1}}} Required. Use the name of the map as the first unnamed parameter. For example, specify England to use the values in {{Location map England}}. See the examples below.
label The text of the label to display next to the mark. A wiki link can be used. The default if not specified is no label, just the marker.
label_size The font size to use for the label, given as a percentage of the normal font size (<100 = smaller, >100 = larger). The default is 90. Do not include %, for example: label_size=80, not label_size=80%.
position The position of the label relative to the mark. Valid values are left, right, top and bottom. The default is right.
background The background color to use for the label. See Web colors. The default is no background color, which shows the map image behind the label.
mark The name of an image to display as the mark. The default is Red pog.svg (Red pog.svg). See examples at Commons:Location markers and Commons:Category:Map icons.
marksize The size of the mark in pixels. The default is 8. Do not include px, for example: marksize=10, not marksize=10px.
link Specifies a wiki link which will be followed if the reader clicks on the mark. The name of the linked article is displayed when the mouse pointer hovers over the mark.
lat_deg Required. The degrees of latitude. This value can be specified using decimal degrees and when this format is used minutes and seconds should not be specified.[Note 1]
lat_min The minutes of latitude.[Note 1]
lat_sec The seconds of latitude. Usually not necessary.[Note 1]
lat_dir N if north (default value) or S for south of the Equator. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for southern latitude).
lon_deg Required. The degrees of longitude. This value can be specified using decimal degrees and when this format is used minutes and seconds should not be specified.[Note 1]
lon_min The minutes of longitude.[Note 1]
lon_sec The seconds of longitude. Usually not necessary.[Note 1]
lon_dir E for east (default value) or W for west of the Prime Meridian. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for western longitude).

Notes:

  1. ^ a b c d e f Appropriate precision should be used. For example, the whole US map, with a 1000-pel width, has a resolution of about 5km/pel. Only 2 decimal places of precision in decimal degrees (~1km), or whole minutes (~1.7km) in DMS format, are required.

Available map templates[rediger | rediger kilde]

Location map templates can be found using these sources:

List of templates - 1050 templates available when the list was generated.
Category:Location map templates - templates sorted by category.
Special:WhatLinksHere/Template:Location map/Info - a search that might help.
Special:Prefixindex/Template:Location map - another search that might help.

Examples[rediger | rediger kilde]

This example does not designate the caption parameter. It demonstrates the use of the defaults. Notice that the default caption is the page name followed by the map name in parenthesis and that the label position is automatically adjusted if it is too close to an edge.

[[File:Mal:Location map Australia|240px|Kartposisjon+ is located in Mal:Location map Australia]]
<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;"><div style="position: relative; text-align: center; left: -Uttrykksfeil: Ugjenkjennelig tegn «[»px; top: -Uttrykksfeil: Ugjenkjennelig tegn «[»px; width: Mal:Location map Australiapx; font-size: Mal:Location map Australiapx; line-height: 0;" title="">[[File:Mal:Location map Australia|Mal:Location map AustraliaxMal:Location map Australiapx|Sydney|link=|alt=]]
<div style="font-size: 90%; line-height: 110%; position: relative; top: -1.5em; width: 6em; Uttrykksfeil: Ugjenkjennelig tegn «[»">Sydney

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;"><div style="position: relative; text-align: center; left: -Uttrykksfeil: Ugjenkjennelig tegn «[»px; top: -Uttrykksfeil: Ugjenkjennelig tegn «[»px; width: Mal:Location map Australiapx; font-size: Mal:Location map Australiapx; line-height: 0;" title="">[[File:Mal:Location map Australia|Mal:Location map AustraliaxMal:Location map Australiapx|Melbourne|link=|alt=]]<div style="font-size: 90%; line-height: 110%; position: relative; top: -1.5em; width: 6em; Uttrykksfeil: Ugjenkjennelig tegn «[»">Melbourne

Kartposisjon+ (Mal:Location map Australia)
{{Location map+ | Australia
| places =
  {{Location map~ | Australia
    | label = Sydney
    | lat_deg = -33.86
    | lon_deg = 151.21 }}
  {{Location map~ | Australia
    | label = Melbourne
    | lat_deg = -37.81
    | lon_deg = 144.96 }}
}}

This example uses a designated but empty caption. It demonstrates coordinates using decimal degrees and a 10px mark with a link.

[[File:Mal:Location map France|240px|Kartposisjon+ is located in Mal:Location map France]]
<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">
[[File:Mal:Location map France|10x10px|Paris|link=Paris|alt=]]
Paris
<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;">
[[File:Mal:Location map France|10x10px|Marseille|link=Marseille|alt=]]
Marseille
{{Location map+ | France
| caption =
| places =
  {{Location map~ | France
    | label = Paris
    | position = top
    | marksize = 10
    | link = Paris
    | lat_deg = 48.8567
    | lon_deg = 2.3508
  }}
  {{Location map~ | France
    | label = Marseille
    | position = top
    | marksize = 10
    | link = Marseille
    | lat_deg = 43.2964
    | lon_deg = 5.3610
  }}
}}

This example uses caption with an assigned value. It demonstrates coordinates in degree, minute, second format, a relief map, label background color and linked labels.

[[File:Mal:Location map USA|300px|Kartposisjon+ is located in Mal:Location map USA]]
<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;"><div style="position: relative; text-align: center; left: -Uttrykksfeil: Ugjenkjennelig tegn «[»px; top: -Uttrykksfeil: Ugjenkjennelig tegn «[»px; width: Mal:Location map USApx; font-size: Mal:Location map USApx; line-height: 0;" title="">alt text for New York City
<div style="font-size: 90%; line-height: 110%; position: relative; top: -1.5em; width: 6em; Uttrykksfeil: Ugjenkjennelig tegn «[»">New York

<div style="position: absolute; top: Uttrykksfeil: Ugjenkjennelig tegn «[»%; left: Uttrykksfeil: Ugjenkjennelig tegn «[»%; height: 0; width: 0; margin: 0; padding: 0;"><div style="position: relative; text-align: center; left: -Uttrykksfeil: Ugjenkjennelig tegn «[»px; top: -Uttrykksfeil: Ugjenkjennelig tegn «[»px; width: Mal:Location map USApx; font-size: Mal:Location map USApx; line-height: 0;" title="">alt text for San Francisco<div style="font-size: 90%; line-height: 110%; position: relative; top: -1.5em; width: 6em; Uttrykksfeil: Ugjenkjennelig tegn «[»">San Francisco

Some cites in the United States
{{Location map+ | USA
| width = 300
| caption = Some cites in the United States
| relief = 1
| places =
  {{Location map~ | USA
    | label = [[New York City|New York]]
    | position =
    | background = white
    | mark = Cyan pog.svg
    | alt = alt text for New York City
    | link = New York City
    | lat_deg = 40 | lat_min = 43 | lat_dir = N
    | lon_deg = 74 | lon_min = 0  | lon_dir = W
  }}
  {{Location map~| USA
    | label = [[San Francisco]]
    | position =
    | background = white
    | mark = Purple pog.svg
    | alt = alt text for San Francisco
    | link = San Francisco
    | lat_deg = 37  | lat_min = 46 | lat_dir = N
    | lon_deg = 122 | lon_min = 25 | lon_dir = W
  }}
}}

Also see the examples on the Location map page, as well as:

Template data[rediger | rediger kilde]

Dette er TemplateData-dokumentasjonen for malen, som brukes av VisualEditor.

Kartposisjon+

This template places one or more location marks on a map.

Malparametre
Parameter Beskrivelse Type Standard Status
Map template name 1 The name of the map template to be used string tom påkrevd
Map width width Determines the width of the map in pixels, overriding any default values. Do not include "px", for example: "300", not "300px". number tom valgfri
Default width default_width Determines the default width of the map in pixels, intended for use by templates such as infoboxes. The default value is 240. Do not include "px". This value will be multiplied by the defaultscale parameter specified in individual map templates, if it exists, in order to achieve an appropriate size for vertical maps. number tom valgfri
Position float Specifies the position of the map on the page. Valid values are left, right, center and none. The default is right. string tom valgfri
Border color border Specifies the color of the map border. If set to none, no border will be generated. string tom valgfri
Map caption caption The text of a caption to be displayed below the map. If caption is defined but is not assigned a value, the map will not be framed and no caption will be displayed. If caption is not defined, the map will not be framed and a default caption will be generated. string tom valgfri
Alt text alt Alt text for map; used by screen readers. string tom valgfri
Alternative map from template relief Any non-blank value (1, yes, etc.) will cause the template to display the map specified in the map definition template as image1, which is usually a relief map. string tom valgfri
Alternative map not from template AlternativeMap Allows the use of an alternative map. The image must have the same edge coordinates as the map template. string tom valgfri
Overlay image overlay_image Allows an overlay to be superimposed on the map. This parameter is seldom used. string tom valgfri
Place markers places Specifies one or more place markers using Location map~. string tom påkrevd

See also[rediger | rediger kilde]