Difference between revisions of "Template:Kerbalmaps"

From Kerbal Space Program Wiki
Jump to: navigation, search
(N -> Nh - North is not Newton anymore)
m
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>[http://www.kerbalmaps.com/?body={{#if: {{{3|}}}|{{{3}}}|Kerbin}}{{#if: {{{o|}}}|&overlays={{{o}}}}}&{{#ifeq: {{{m|}}}|X|center|loc}}={{#expr: {{{1|0}}} fmod 180}},{{#expr: {{{2|0}}} fmod 180}}{{Booland|{{{m|}}}|{{#ifeq: {{{m|}}}|X||1}}|,{{{m}}}}}{{#if: {{{z|}}}|&zoom={{{z}}}|{{#ifeq: {{{m|}}}|X|&zoom=5}}}} {{#ifeq: {{{text|}}}|C|{{Infobox/Location/Coordinate|{{{1}}}|Nh|S}} {{Infobox/Location/Coordinate|{{{2}}}|E|W}}|{{{text|{{lang|en=Map|fr=Carte|pl=Mapa|it=Mappa|es=Mapa|nl=Kaart|ru=карта|de=Karte|ko=지도|hu=Térkép}}}}}}}]</includeonly><noinclude>Links to [http://www.kerbalmaps.com http://www.kerbalmaps.com]. Although the first and second parameter have a default value they are only to avoid invalid links. Uses the API documented in [[thread:25148|Kerbal Maps: Web maps of all bodies.]] thread by ''saik0''.
+
<includeonly>[https://kerbal-maps.finitemonkeys.org/?body={{#if: {{{3|}}}|{{{3}}}|Kerbin}}{{#if: {{{o|}}}|&overlays={{{o}}}}}&{{#ifeq: {{{m|}}}|X|center|loc}}={{#expr: {{{1|0}}} fmod 180}},{{#expr: {{{2|0}}} fmod 180}}{{#if: {{{m|}}}|{{#if: {{#ifeq: {{{m|}}}|X||1}}|,{{{m}}}}}|,Pin}}{{#if: {{{z|}}}|&zoom={{{z}}}|{{#ifeq: {{{m|}}}|X|&zoom=5}}}} {{#ifeq: {{{text|}}}|C|{{Infobox/Location/Coordinate|{{{1}}}|Nh|S}} {{Infobox/Location/Coordinate|{{{2}}}|E|W}}|{{{text|{{lang|en=Map|fr=Carte|pl=Mapa|it=Mappa|es=Mapa|nl=Kaart|ru=На карте|de=Karte|ko=지도|hu=Térkép}}}}}}}]</includeonly><noinclude>
{{Parameter Table|name=both|parameters=
+
{{Documentation}}
{{Parameter Row|1|Latitude. Positive is north, negative is south.}}
+
</noinclude>
{{Parameter Row|2|Longitude. Positive is east, negative is west.}}
 
{{Parameter Row|3|Name of the [[celestial body]].|<tt>''Kerbin''</tt>}}
 
{{Parameter Row|text|Link text shown. If set to <tt>C</tt> it'll show the coordinate using {{Tl|Infobox/Location/Coordinate}}.|<tt>''Map''</tt>}}
 
{{Parameter Row|m|Text for the marker. If set to <tt>X</tt> it won't show a marker at all. Needs to be a URL encoded string.|Not set/Empty text}}
 
{{Parameter Row|o|Comma separated overlays; possible values are: <tt>spacecenters</tt>, <tt>anomalies</tt>, <tt>poi</tt>.|Not set/Empty text}}
 
{{Parameter Row|z|Zoom level from 0 to 5 or <tt>fit</tt>.|<tt>5</tt> if <tt>{{{m}}}</tt> is set to <tt>X</tt>}}
 
}}
 
 
 
[[Category:Metatemplates]]</noinclude>
 

Latest revision as of 00:11, 28 February 2021

Documentation icon Template documentation[view] [edit] [history] [purge]Pages that link to Template:Kerbalmaps

Usage

Links to Kerbal Maps. Although the first and second parameter have a default value they are only to avoid invalid links. Uses the API documented in Kerbal Maps: Web maps of all bodies. thread by saik0.

#/Name Optional Description Default
1 No Latitude. Positive is north, negative is south.
2 No Longitude. Positive is east, negative is west.
3 Yes Name of the celestial body. Kerbin
text Yes Link text shown. If set to C it'll show the coordinate using {{Infobox/Location/Coordinate}}. Map
m Yes Text for the marker. If set to X it won't show a marker at all. Needs to be a URL encoded string. Pin
o Yes Comma separated overlays; possible values are: spacecenters, anomalies, poi. Not set/Empty text
z Yes Zoom level from 0 to 5 or fit. 5 if {{{m}}} is set to X