Template:Infobox mapframe/doc

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 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 the Wikidata item has an  specified.
 * See Category:Infobox mapframe without OSM relation ID on Wikidata for pages which have items without
 * Troubleshooting shapes guidance is found at Module talk:mapframe/FAQ

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

Basic
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.
 * If the Wikidata item does not specify a value, then a point marker will be displayed by default in addition any OSM shape or line feature.
 * If the Wikidata items does not specify a or a  value, then no map will be displayed

Point feature (Wikidata coordinates):

Line feature:

Shape feature:

Using specified coordinates instead of Wikidata
Point feature only, no shapes or lines: Point feature and shape/line feature if available:

Specify coordinates using the templates, e.g. coord
 * If coord is specified, then by default only that coordinate will be displayed (no line or shape features)
 * If coord is specified and yes is used, then those coordinate will be displayed, along with any line or shape features linked to the Wikidata item.

Point feature (with coordinates specified, no shape/line feature from Wikidata item):

Point feature (with coordinates specified, along with shape/line feature from Wikidata item):

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

Turn point marker on or off
Force point marker to be displayed: Prevent point marker from being displayed:

Turn shape feature off
Prevent shape feature from being displayed:

Turn line feature off
Prevent line feature from being displayed:

Show a geomask from a related Wikidata item
Set geomask to a Wikidata item id (Q-number), or property id (P-number) such as

Use the item linked from the statement as a geomask:

Use the item as a geomask:

Determine zoom from object length or area
Use length_km or length_mi or area_km2 or area_mi2

Determine zoom from object length in kilometres or miles

Determine zoom from object area in square kilometres or square miles

Parameters
All parameters are optional.

Examples for use within templates
Infobox hospital (as of 5 October 2019)

Infobox power station (as of 2 April 2019):

Infobox Australian road (as of 5 October 2019):

TemplateData
{	"params": { "mapframe": { "aliases": [ "alias" ],			"label": "mapframe", "description": "=yes will create a map", "type": "boolean", "default": "no" },		"mapframe-caption": {}, "mapframe-custom": {}, "qid": {}, "coordinates": {}, "mapframe-wikidata": {}, "mapframe-shape": {}, "mapframe-point": {}, "mapframe-line": {}, "mapframe-geomask": {}, "mapframe-switcher": {}, "mapframe-frame-width": {}, "mapframe-frame-height": {}, "mapframe-shape-fill": {}, "mapframe-shape-fill-opacity": {}, "mapframe-stroke-color": {}, "mapframe-stroke-width": {}, "mapframe-marker": {}, "mapframe-marker-color": {}, "mapframe-geomask-stroke-color": {}, "mapframe-geomask-stroke-width": {}, "mapframe-geomask-fill": {}, "mapframe-geomask-fill-opacity": {}, "mapframe-zoom": {}, "mapframe-length_km": {}, "mapframe-length_mi": {}, "mapframe-area_km2": {}, "mapframe-area_mi2": {}, "mapframe-frame-coordinates": {} } }