Difference between revisions of "Template:Location map old"
Jump to navigation
Jump to search
m (I pressed a 4 instead of a 7 on my calculator and i never noticed) |
(Implemented AK (WARNING: THIS HAS A HIGH CHANCE OF NOT WORKING SINCE AK HAS THE MOST WHACK LONGITUDINAL BOUNDS)) |
||
Line 3: | Line 3: | ||
<div class="location-map-pin" style="left: {{#expr: ((({{#switch: {{{mapname|}}} | <div class="location-map-pin" style="left: {{#expr: ((({{#switch: {{{mapname|}}} | ||
| File:Alabama.svg = -88.7 | | File:Alabama.svg = -88.7 | ||
+ | | File:Alaska.svg = 172 | ||
| File:Arizona.svg = -115 | | File:Arizona.svg = -115 | ||
| File:California.svg = -124.7 | | File:California.svg = -124.7 | ||
Line 28: | Line 29: | ||
}}) - ({{{p1long|}}}))/(({{#switch: {{{mapname|}}} | }}) - ({{{p1long|}}}))/(({{#switch: {{{mapname|}}} | ||
| File:Alabama.svg = -88.7 | | File:Alabama.svg = -88.7 | ||
+ | | File:Alaska.svg = 172 | ||
| File:Arizona.svg = -115 | | File:Arizona.svg = -115 | ||
| File:California.svg = -124.7 | | File:California.svg = -124.7 | ||
Line 53: | Line 55: | ||
}}) - ({{#switch: {{{mapname|}}} | }}) - ({{#switch: {{{mapname|}}} | ||
| File:Alabama.svg = -84.7 | | File:Alabama.svg = -84.7 | ||
+ | | File:Alaska.svg = -129 | ||
| File:Arizona.svg = -108.7 | | File:Arizona.svg = -108.7 | ||
| File:California.svg = -113.9 | | File:California.svg = -113.9 | ||
Line 78: | Line 81: | ||
}})) * {{#if: {{{width|}}}|{{{width|}}}}}) - 4}}px; top: {{#expr: ((({{#switch: {{{mapname|}}} | }})) * {{#if: {{{width|}}}|{{{width|}}}}}) - 4}}px; top: {{#expr: ((({{#switch: {{{mapname|}}} | ||
| File:Alabama.svg = 35.2 | | File:Alabama.svg = 35.2 | ||
+ | | File:Alaska.svg = 72 | ||
| File:Arizona.svg = 37.3 | | File:Arizona.svg = 37.3 | ||
| File:California.svg = 42.2 | | File:California.svg = 42.2 | ||
Line 103: | Line 107: | ||
}}) - ({{{p1lat|}}}))/(({{#switch: {{{mapname|}}} | }}) - ({{{p1lat|}}}))/(({{#switch: {{{mapname|}}} | ||
| File:Alabama.svg = 35.2 | | File:Alabama.svg = 35.2 | ||
+ | | File:Alaska.svg = 72 | ||
| File:Arizona.svg = 37.3 | | File:Arizona.svg = 37.3 | ||
| File:California.svg = 42.2 | | File:California.svg = 42.2 | ||
Line 128: | Line 133: | ||
}}) - ({{#switch: {{{mapname|}}} | }}) - ({{#switch: {{{mapname|}}} | ||
| File:Alabama.svg = 29.9 | | File:Alabama.svg = 29.9 | ||
+ | | File:Alaska.svg = 51 | ||
| File:Arizona.svg = 31.1 | | File:Arizona.svg = 31.1 | ||
| File:California.svg = 32.3 | | File:California.svg = 32.3 | ||
Line 153: | Line 159: | ||
}})) * {{#if: {{{width|}}}|{{#expr: {{{width|}}}*{{#switch: {{{mapname|}}} | }})) * {{#if: {{{width|}}}|{{#expr: {{{width|}}}*{{#switch: {{{mapname|}}} | ||
| File:Alabama.svg = 637/400 | | File:Alabama.svg = 637/400 | ||
+ | | File:Alaska.svg = 299/400 | ||
| File:Arizona.svg = 492/400 | | File:Arizona.svg = 492/400 | ||
| File:Colorado.svg = 294/400 | | File:Colorado.svg = 294/400 |
Revision as of 02:12, 30 April 2020
This template uses Lua: |
Parts of this documentation were copied from the English Wikipedia article on this module. Note that the documentation could have been edited since copying. |
The Location map template is helpful for creating static maps on the wiki.
Maps Supported
This template will work for all 50 states and the District of Columbia. To use more than one point, use the Location map many template.
Parameters
mapname
- the name of the mapwidth
- the width of the map in pixels (do not include "px")label
- the name of the pointcoordinates
- the coordinates of the point
Optional parameters
Reference wikipedia's documentation for additional parameters.
Icons
Icon | Name |
---|---|
Red pog.svg | |
Yellow pog.svg | |
Blue pog.svg | |
Purple pog.svg | |
Red Arrow Up.svg | |
Red Arrow Right.svg | |
Red Arrow Down.svg | |
Red Arrow Left.svg |
Finding Coordinates
Do you not know how to find coordinates for an object? This should help:
- Understand that for coordinates in North America, longitude should generally be between -130 and -60 and latitude should generally be between 50 and 20
- Use a search engine to find the coordinates. For example, "Boca Raton Community High School coordinates".
- Get the coordinates from a search result.
- Make sure longitude (the bigger number) is negative and latitude (the smaller number) is positive
- Discard anything regarding "N", "E", "S", "W" and make sure your coordinates are simply a decimal number (no ', ", or ° characters)
Examples
Code | Result |
---|---|
{{Location map | Florida | width = 250 | float = right | label = Boca Raton Community High School | coordinates = {{coord|26.362254|-80.116757}} }} |
|
{{Location map | Florida | width = 400 | float = none | caption = Boca's location in FL | label = Boca Raton Community High School | coordinates = {{coord|26.362254|-80.116757}} | mark = Purple pog.svg }} |
|
{{Location map | Florida | width = 400 | float = none | caption = Boca's location in FL | label = Boca Raton Community High School | coordinates = {{coord|26.362254|-80.116757}} | background = yellow | position = bottom }} |