Template:Streetmap: Difference between revisions

From Wikishire
Jump to navigation Jump to search
RB (talk | contribs)
No edit summary
RB (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{#vardefine:hlong|{{#expr:({{#len:{{{1}}} }}-2)/2}} }}{{#vardefine:pad|{{#switch:{{#var:hlong}}
<includeonly>{{#if:{{{1|}}}|{{#vardefine:hlong|{{#expr:({{#len:{{{1}}} }}-2)/2}} }}{{#vardefine:pad|{{#switch:{{#var:hlong}}
|-0.5
|-0.5
|0=50000
|0=50000
Line 11: Line 11:
|4=0
|4=0
|}}}}{{#ifeq:{{iseven|{{{1}}}|l}}|n|https://www.streetmap.co.uk/map.srf?x={{GBfromIEgrid|{{{1}}}|E}}&y={{GBfromIEgrid|{{{1}}}|N}}&z=120|https://www.streetmap.co.uk/map.srf?x={{GBgridNum|{{{1}}}|E}}{{#var:pad}}&y={{GBgridNum|{{{1}}}|N}}{{#var:pad}}&z=120
|}}}}{{#ifeq:{{iseven|{{{1}}}|l}}|n|https://www.streetmap.co.uk/map.srf?x={{GBfromIEgrid|{{{1}}}|E}}&y={{GBfromIEgrid|{{{1}}}|N}}&z=120|https://www.streetmap.co.uk/map.srf?x={{GBgridNum|{{{1}}}|E}}{{#var:pad}}&y={{GBgridNum|{{{1}}}|N}}{{#var:pad}}&z=120
}}<!--Old material
}}}}</includeonly><noinclude>[[Category:Map templates|Streetmap]]
 
{{#vardefine:hlong|{{#expr:({{#len:{{{1}}} }}-2)/2}} }}{{#vardefine:pad|{{#switch:{{#var:hlong}}
|0=50000
|1=0000
|2=000
|3=00
|4=0
|}}}}{{#vardefine:add|{{#switch:{{#sub:{{{1}}}|0|1}}
|J
|O
|T=5
|0}} }}{{#vardefine:n1snip|{{#sub:{{{1}}}|2|{{#var:hlong}}}}{{#var:pad}}}}{{#vardefine:n2snip|{{#sub:{{{1}}}|{{#expr:{{#var:hlong}}+2}}|{{#var:hlong}}}}{{#var:pad}}}}{{#vardefine:zoom|{{#expr:150-{{#var:hlong}}*10}}}}http://streetmap.co.uk/grid/{{#switch:{{#sub:{{{1}}}|1|1}}
|A
|F
|L
|Q
|V={{#expr:0+{{#var:add}}}}
|B
|G
|M
|R
|W={{#expr:1+{{#var:add}}}}
|C
|H
|N
|S
|X=2
|D
|J
|O
|T
|Y=3
|E
|K
|P
|U
|Z=4
}}{{#var:n1snip}},{{#switch:{{#sub:{{{1}}}|0|2}}
|HL
|HM
|HN
|HO
|HP
|JL
|JM=12
|HQ
|HR
|HS
|HT
|HU
|JQ
|JR=11
|HV
|HW
|HX
|HY
|HZ
|JV
|JW=10
|NA
|NB
|NC
|ND
|NE
|OA
|OB=9
|NF
|NG
|NH
|NJ
|NK
|OF
OG=8
|NL
|NM
|NN
|NO
|NP
|OL
|OM=7
|NQ
|NR
|NS
|NT
|NU
|OQ
|OR=6
|NV
|NW
|NX
|NY
|NZ
|OV
|OW=5
|SA
|SB
|SC
|SD
|SE
|TA
|TB=4
|SF
|SG
|SH
|SJ
|SK
|TF
|TG=3
|SL
|SM
|SN
|SO
|SP
|TL
|TM=2
|SQ
|SR
|SS
|ST
|SU
|TQ
|TR=1
|SV
|SW
|SX
|SY
|SZ
|TV
|TW=0
}}{{#var:n2snip}},{{#var:zoom}}--><noinclude>[[Category:Map templates|Streetmap]]

Latest revision as of 16:15, 8 March 2020