Template:Mapbox sandbox

From All About Ayrshire
Jump to: navigation, search

Template:Mapbox This template displays an inline map from Maps with an accompanying caption.

To use this template, copy the code below, replacing anything within <tags> as appropriate.

{{mapbox |lat=<lat> |lon=<lon> |layer=<layer> |zoom=<zoom> |caption=<caption> |width<trace> |width=<width> |height=<height> |align=<align> |static=[true | false] }}

<lat> - The latitude for the centre of the map.
<lon> - The longitude for the centre of the map.
<layer> - The historical layer to display. See Help:Maps for a list of supported types. Leave blank to select modern OpenStreetMap mapping
<zoom> - The zoom level to display for the map. Possible values are from 3 (all of Britain and Ireland) upwards. Quarter inch maps normally go up to zoom 12, half inch to 13, one inch to 14 and 1:25,000 to 15.
<caption> - The caption to put underneath the map.
<trace> - An optional trace file to display on the map.
<width> - The width of the box - default 182.
<height> - The height of the box
<align> - The alignment of the box (left, centre, right). Default left.
<static> - If set to "true", does not display any navigation control for the map. Defaults to "false".

Example:

{{mapbox |static=false |width=250 |lat=56.571823 |lon=-4.785548 |layer=mot |zoom=10 |trace=A8/A82.osm |align=right |caption=Three generations of the A82 across Rannoch Moor.}}

This creates a map box 250 pixels wide, right-aligned, with navigation, centred on latitude 56.571823, longitude -4.785548, with a caption. The layer name is "mot" (1923 MOT Half Inch), the zoom level is 10, a trace file A8/A82.osm is loaded.