Motorway Services Online

Retrieved from "https://motorwayservices.uk"

Template:Map brands

This template generates a map of each brand.

The map can be created by simply writing {{Map brands}} on a blank page (preferably within the maps namespace, for example a page called Map:WHSmith.

The map will then search for every page which uses the template with the exact same name as the page name. So if the page was called Map:WHSmith, it will search for every page that uses Template:WHSmith. If a branch appears to be missing, chances are it's not using that template. You need to go to the service area concerned, and look for the curly brackets, like {{WHSmith}}.

The other common problem is that the map pulls its detail on the service area from Template:Services. If a service area is recorded wrongly, you need to go to that service area page and check the details there.

The code can also do the following: 1. Supply a different brand name, using variable '1' (for example: {{Map brands|WHSmith}} This is mostly a cosmetic change to tackle issues caused by apostrophes. 2. It will search for detail about the brand in question, and display it in an infobox using Template:Services dpl2. Again the search is prompted by the name of your page. So if your page is called Map:WHSmith, it will get the data from the page named WHSmith.

The map layers and settings can be customised here, and apply to all pages. It will format the data using Template:Services dpl6 and Template:Services dpl7. The script also lists each brand name, to tell it how to check whether the brand is 'westbound only' or similar. A special search is configured for use by Map:Changing Places.

Old Brands

The script can also be exploited for use by old brands. Mostly it is used the exact same way, except that normally this would return no results, as a brand like Happy Eater doesn't have any branches open.

To get round this, we use the following variables:

  • |intro = a custom introduction relevant to the brand concerned
  • |data = the list of branches
  • |kml = the name of a file where the data can be downloaded to Google Earth. This is optional, and is linked up to a script stored on the main server (not editable by most people).

The map data is a standard set-up, but most editors wouldn't normally encounter it. To add an icon to the map, the format is as follows:

latitude, longitude ~ CAPTION ~~ ICON;

Note the key pieces of punctuation there: the comma between latitude and longitude (as is normally done with coordinates), the tilde between coordinates and caption, the two tildes between caption and icon, and the semicolon to confirm the end of that icon (not necessary after the last entry).

The 'caption' includes all the information you want to be visible when somebody taps on your icon including, at the very least, the branch name. Normal wikicode goes in here, including links and {{newline}}. Try to avoid large gaps, which can cause the system to assume it's the end of your entry.

The 'icon' is the name of the file which you want to use to represent that branch, for example File:Icon-TRSA.png is the file where you will find the standard green icon. The 'file:' part is not necessary.

This template automatically generates a map showing all the places where this brand's template has been used. To make a change to a current brand, go to that service area's page.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Clean Name1

An alternative spelling of the brand name that avoids anything the website heading won't like.

Default
{{PAGENAME}}
Example
McDonald's
Stringsuggested
Page Namename

The correct spelling of the page name.

Default
{{PAGENAME}}
Example
McDonald's
Stringoptional
Page Name (old)3

An alternative spelling of the page name. Purpose not clear.

Stringdeprecated
Facility Type2

By default, each branch will be referred to as an outlet. You can enter an alternative word here.

Default
outlet
Stringoptional
History Descriptionintro

For history pages, enter an introduction to the map here.

Contentoptional
History Map Datadata

For history pages, list the coordinates of each location, and its detail here.

Example
latitude, longitude ~ CAPTION ~~ ICON;
Contentoptional
Footnotefooter

For history pages, we can add more text below the map, if we really need to.

Stringoptional
History KMLkml

For history pages, link to the KML file, if provided. Creating a KML file requires root admin access.

Stringoptional
Countrycountry

The country the brand currently operates in (as far as service areas are concerned only) affects where the map focuses on.

Default
both
Example
Ireland, UK or both
Stringrequired