Шаблон:Infobox mapframe

Материал из Википедии — свободной энциклопедии
Перейти к навигации Перейти к поиску



This template generates a mapframe map, suitable for infoboxes, with minimal user input. This template only works with single features (points, lines, or shapes); use {{maplink}} if more advanced options, such as displaying multiple features, are required.

If coordinates are not supplied, they will be fetched from the page's Wikidata item. In such cases, if |point = is not set, then a point feature marker is displayed at those coordinates unless the Wikidata item has an ID отношения в OpenStreetMap (P402) specified.

Usage[править код]

Note: When in mainspace, parameter |id = is not required (except to use a different page's data)

Basic[править код]

{{Infobox mapframe}}

When used without parameters, or with only |id =, the map will display either a shape, line, or point feature, depending on the data available on Wikidata and OpenStreetMap.

Using specified coordinates instead of Wikidata[править код]

Point feature only, no shapes or lines:

{{Infobox mapframe |coord=}}

Point feature and shape/line feature if available:

{{Infobox mapframe |wikidata=yes |coord=}}

Specify coordinates using the {{Coord}} templates, e.g. |coord = {{Coord|32.1|S|116.2|E}}

  • If |coord = is specified, then by default only that coordinate will be displayed (no line or shape features)
  • If |coord = is specified and |wikidata = yes is used, then those coordinate will be displayed, along with any line or shape features linked to the Wikidata item.

Customizing which features are displayed[править код]

Inverse shape[править код]

{{Infobox mapframe |shape=inverse}}

Replace the shape with an inverse-shape (geomask) by setting |shape = inverse

Turn point marker on or off[править код]

Force point marker to be displayed:

{{Infobox mapframe |point=on}}

Prevent point marker from being displayed:

{{Infobox mapframe |point=none}}

Turn shape feature off[править код]

Prevent shape feature from being displayed:

{{Infobox mapframe |shape=none}}

Turn line feature off[править код]

Prevent line feature from being displayed:

{{Infobox mapframe |line=none}}

Show a geomask from a related Wikidata item[править код]

{{Infobox mapframe |geomask=}}

Set |geomask = to a Wikidata item id (Q-number), or property id (P-number) such as государство (P17)

Determine zoom from object length or area[править код]

Use |length_km = or |length_mi = or |area_km2 = or |area_mi2 =

Parameters[править код]

All parameters are optional.

Пример использоваения шаблона[править код]

Template data[править код]