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 Gratisdata item. In such cases, if point is not set, then a point feature marker is displayed at those coordinates the Gratisdata item has an  specified.
 * See Category:Infobox mapframe without OSM relation ID on Gratisdata for pages which have items without

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 Gratisdata and OpenStreetMap.
 * If the Gratisdata 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 Gratisdata items does not specify a then no map will be displayed

Point feature (Gratisdata coordinates):

Line feature:

Shape feature:

Using specified coordinates instead of Gratisdata
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 Gratisdata item.

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

Point feature (with coordinates specified, along with shape/line feature from Gratisdata 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 Gratisdata item
Set geomask to a Gratisdata 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
 * image3   =
 * caption3 =

Infobox power station: | image2       =
 * caption2     =

Infobox Australian road
 * data3       =

Template data
{	"params": { "mapframe": { "aliases": [ "alias" ],			"label": "mapframe", "description": "=yes will create a map", "type": "boolean", "default": "no" },		"mapframe-caption": {}, "mapframe-custom": {}, "qid": {}, "coordinates": {}, "mapframe-gratisdata": {}, "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": {} } }