Difference between revisions of "Template:Mapbox/doc"
BelgianCat (talk | contribs) (Created documentation for MapBox template, as this is a very useful template, thanks Bouncer!)) |
BelgianCat (talk | contribs) m (previous edit cleaned up example) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{note|when trying to edit the coordinates of a | + | {{note|when trying to edit the coordinates of a mapbox, do not try to edit the section header, but edit the page instead. Trying to edit the section header, will change the base template itself instead.}} |
− | This template (created by Bouncer#1861) creates a location header with a map and dot to indicate the location. | + | This template (created by Bouncer#1861) creates a location header with a map and dot or icon to indicate the location. |
First we need the coordinates from the game. | First we need the coordinates from the game. | ||
Line 7: | Line 7: | ||
*For the ttmap, zoom in all the way, right click on location and copy the coordinates link. | *For the ttmap, zoom in all the way, right click on location and copy the coordinates link. | ||
− | + | The game location must be converted to coordinates on the displayed map. You can either provide the original game coordinates, or apply the formula yourself and directly enter the computed coordinates. | |
− | + | ||
+ | == Using original game location == | ||
+ | <pre> | ||
+ | {{mapbox | ||
+ | | gamex = 5.1 | ||
+ | | gamey = 225.9 | ||
+ | | icon = Blip Trucking 2.png | ||
+ | }} | ||
+ | </pre> | ||
+ | |||
+ | == Using converted map locations == | ||
+ | Both x and y coordinates need to converted using different formulas: | ||
+ | <pre> | ||
+ | x = (x + 6646) / -13.905 + 200 | ||
+ | y = (y + 4866) / 13.905 - 850 | ||
+ | </pre> | ||
(you can simply use [https://docs.google.com/spreadsheets/d/1HnCavmRwV7Jc6iOS23gR4jpXcGFXlaudi7iSQGc_0iM/edit#gid=1708393843&range=C2 this] spreadsheet for calculating) | (you can simply use [https://docs.google.com/spreadsheets/d/1HnCavmRwV7Jc6iOS23gR4jpXcGFXlaudi7iSQGc_0iM/edit#gid=1708393843&range=C2 this] spreadsheet for calculating) | ||
− | + | ||
− | <pre> | + | <pre> |
− | + | {{mapbox | |
− | {{mapbox|x=-296.6199209|y=-485.3254225|color=255,125,0}} | + | | x = -296.6199209 |
− | This mapbox example | + | | y = -485.3254225 |
− | See | + | | icon = Blip Trucking 2.png |
+ | }} | ||
+ | </pre> | ||
+ | |||
+ | == Icons == | ||
+ | An image icon can be provided and will be displayed at fixed dimensions. Alternatively a color can be provided as rgb to show a colored blip, e.g. color=255,125,0. | ||
+ | |||
+ | == Header == | ||
+ | In case you want to leave out the Location header, you can do that by adding <pre>|noheader=true</pre> | ||
+ | |||
+ | {{mapbox|x=-296.6199209|y=-485.3254225 |icon = Blip Trucking 2.png|color=255,125,0}} | ||
+ | This mapbox example uses the following parameters: | ||
+ | <pre>{{mapbox|x=-296.6199209|y=-485.3254225 |icon = Blip Trucking 2.png|color=255,125,0}}</pre> | ||
+ | See [[Special:WhatLinksHere/Template:Mapbox]] for all pages using the Mapbox template. | ||
+ | <br><br><i>End of documentation</i> | ||
+ | ---- |
Latest revision as of 21:31, 5 June 2022
This template (created by Bouncer#1861) creates a location header with a map and dot or icon to indicate the location.
First we need the coordinates from the game. With some luck, the location might be in the transformer dump (provided by glitchdetector#0621): dump discord link Otherwise, use ttmap.eu
- For the ttmap, zoom in all the way, right click on location and copy the coordinates link.
The game location must be converted to coordinates on the displayed map. You can either provide the original game coordinates, or apply the formula yourself and directly enter the computed coordinates.
Using original game location
{{mapbox | gamex = 5.1 | gamey = 225.9 | icon = Blip Trucking 2.png }}
Using converted map locations
Both x and y coordinates need to converted using different formulas:
x = (x + 6646) / -13.905 + 200 y = (y + 4866) / 13.905 - 850
(you can simply use this spreadsheet for calculating)
{{mapbox | x = -296.6199209 | y = -485.3254225 | icon = Blip Trucking 2.png }}
Icons
An image icon can be provided and will be displayed at fixed dimensions. Alternatively a color can be provided as rgb to show a colored blip, e.g. color=255,125,0.
Header
In case you want to leave out the Location header, you can do that by adding
|noheader=true
Location
This mapbox example uses the following parameters:
{{mapbox|x=-296.6199209|y=-485.3254225 |icon = Blip Trucking 2.png|color=255,125,0}}
See Special:WhatLinksHere/Template:Mapbox for all pages using the Mapbox template.
End of documentation