PathfinderWiki
Log in

Template:Region map/doc

From PathfinderWiki

{{Region map}} produces a regional map suitable for use in infoboxes, such as {{City}}, by viewing a specific part of File:Inner Sea region map.jpg. The map viewer uses the OpenLayers 2 library, via the Custom map widget.

Usage

{{Region map
| x = 
| y = 

| zoom       = 
| zoomlevels = 

| file       = 
| fileurl    = 
| layername  = 
| filewidth  = 
| fileheight = 

| width  = 
| height = 
| attributionurl  = 
| attributiontext = 
}}

For region maps that use File:Inner Sea region map.jpg, these are the only required parameters:

x
The x coordinate for the map's center, in pixels from the image's left edge.
y
The y coordinate for the map's center, in pixels from the image's top edge.

For any map, these parameters are optional:

zoom (optional)
The map's zoom level. For the default File:Inner Sea region map.jpg region maps, the default value is 2 (no zoom) and valid values range from 0 (zoomed out twice) to 3 (zoomed in once).
zoomlevels (optional)
The number of available zoom levels. The default and recommended value is 4.

You can also optionally configure {{Region map}} to use other maps:

file or fileurl (optional)
The file to use as the map.
If you use file, enter the filename of a file on the wiki. For example, for File:Inner Sea region map.jpg, the value should be Inner Sea region map.jpg.
If you use fileurl, enter the full URL to an image, such as http://pathfinderwiki.com/mediawiki/images/a/a1/Inner_Sea_region_map.jpg. Please avoid linking to external images, and if you do, you **must** use the attributionurl and attributiontext parameters to link to and credit the source.
If you use fileurl, the template ignores the value of file.
layername (optional)
The name of the layer, currently unused. Defaults to Inner Sea region.
filewidth
The width of the original image in pixels. Required if you set file or fileurl.
fileheight
The height of the original image in pixels. Required if you set file or fileurl.

You can also optionally modify the region map's presentation and attribution link:

width (optional)
The width of the map viewer. Defaults to 250px, suitable for the regionmap parameter of {{City}}.
height (optional)
The height of the map viewer. Defaults to 200px, suitable for the regionmap parameter of {{City}}.
attributionurl (optional)
The full URL for the attribution link. Defaults to the full URL of the wiki file provided by the file attribute, which by default is Inner Sea region map.jpg. If you provide an attributionurl, the template ignores the value of file.
attributiontext (optional)
The text of the attribution link. Defaults to Map source.

Usage tips

  • When possible, avoid placing more than one region map on a page.
  • Remember that text for settlements on the default Inner Sea region map is unreadable at zoom levels 0 and 1, and text for nations and large terrain features is difficult to read at zoom level 0.

Examples

This simple example creates a region map of Usaro, located 929 pixels from the left edge of File:Inner Sea region map.jpg and 2,734 pixels from the top:

{{Region map|x=929|y=2734}}

Map source


This example creates a region map of the Realm of the Mammoth Lords by centering the map over the nation and zooming out one level:

{{Region map
| x    = 1126
| y    = 477
| zoom = 1
}}

This example creates a large zoomable map of Brevoy using the map of Brevoy and its neighbors, and attributes it to its creator Narolas:

{{Region map
| x = 4000
| y = 2650

| zoom       = 0
| zoomlevels = 6

| file       = Map_of_Brevoy_and_its_neighbors.jpg
| layername  = Brevoy and its neighbors
| filewidth  = 7896
| fileheight = 5286

| width  = 800px
| height = 600px
| attributionurl  = http://narolas.tumblr.com/post/121565230965/hey-i-finally-finished-these-so-heres-the
| attributiontext = Map by Narolas
}}

To view this example, see {{Region map/doc/Large example}}.