Template:Coord: Difference between revisions
Simplewiki>Galobtter m Changed protection settings for "Template:Coord": Only purpose is to call fully-protected module ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) |
No edit summary |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>{{# | <includeonly> | ||
{{ | {{#if: {{{display|}}} | ||
< | | {{#ifeq: {{{display}}}|title|<span class="geo-title" style="display:none">{{#if: {{{name|}}}|{{{name}}}|Coordinates}}</span>}} | ||
}}{{#if: {{{1|}}}{{{3|}}} | |||
| {{#if: {{{4|}}} | |||
| {{{1}}}°{{{2}}} {{{3}}}°{{{4}}} | |||
| {{{1}}}°{{{2}}}, {{{3}}}°{{{5}}} | |||
}} | |||
}} | |||
</includeonly> | |||
<noinclude> | |||
== Usage == | |||
This template is used to add geographical coordinates to a page. | |||
=== Syntax === | |||
<pre> | |||
{{Coord|latitude|N/S|longitude|E/W|type=feature_type|display=inline|name=name}} | |||
</pre> | |||
=== Parameters === | |||
* '''latitude''' and '''longitude''': Required values. | |||
- Enter the latitude and longitude in degrees. | |||
- Use `N` for north, `S` for south, `E` for east, and `W` for west. | |||
* '''type''' (optional): Describes the type of location. Examples include `city`, `landmark`, etc. | |||
* '''display''' (optional): Defines how the coordinates appear: | |||
- `inline` (default): Coordinates appear within the page text. | |||
- `title`: Coordinates are hidden in text but appear in the title bar. | |||
- `inline,title`: Coordinates appear both in the text and title. | |||
* '''name''' (optional): Adds a label for the coordinates when linked to maps. | |||
=== Examples === | |||
Basic example: | |||
<pre> | |||
{{Coord|23.8103|N|90.4125|E}} | |||
</pre> | |||
Renders as: | |||
<nowiki>23°48′37″N 90°24′45″E</nowiki> | |||
Using the `type` and `display` parameters: | |||
<pre> | |||
{{Coord|23.8103|N|90.4125|E|type=city|display=inline,title}} | |||
</pre> | |||
Renders as: | |||
<nowiki>23°48′37″N 90°24′45″E</nowiki> (with coordinates also in the title). | |||
== Notes == | |||
This template is designed for straightforward use without additional modules. It supports basic coordinate display needs. | |||
</noinclude> | </noinclude> | ||
Latest revision as of 23:50, 10 December 2024
Usage
This template is used to add geographical coordinates to a page.
Syntax
{{Coord|latitude|N/S|longitude|E/W|type=feature_type|display=inline|name=name}}
Parameters
- latitude and longitude: Required values.
- Enter the latitude and longitude in degrees. - Use `N` for north, `S` for south, `E` for east, and `W` for west.
- type (optional): Describes the type of location. Examples include `city`, `landmark`, etc.
- display (optional): Defines how the coordinates appear:
- `inline` (default): Coordinates appear within the page text. - `title`: Coordinates are hidden in text but appear in the title bar. - `inline,title`: Coordinates appear both in the text and title.
- name (optional): Adds a label for the coordinates when linked to maps.
Examples
Basic example:
{{Coord|23.8103|N|90.4125|E}}
Renders as: 23°48′37″N 90°24′45″E
Using the `type` and `display` parameters:
{{Coord|23.8103|N|90.4125|E|type=city|display=inline,title}}
Renders as: 23°48′37″N 90°24′45″E (with coordinates also in the title).
Notes
This template is designed for straightforward use without additional modules. It supports basic coordinate display needs.