Карта

Документация

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 править