Difference between revisions of "Template:Location"
Jump to navigation
Jump to search
(16 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#arraydefine: mapaddr | <includeonly>{{#arraydefine: mapaddr | ||
− | |{{#arraymap: | + | |{{#arraymap: Street,City,Zipcode,State|,|@@@|{{#if: {{{@@@|}}}|{{{@@@|}}}, }}|}}{{{Country|United States of America}}} |
|* | |* | ||
− | }}<!-- -->{{#subobject: | + | }}<!-- -->{{#vardefine: geo|{{#geocode:location={{{Building number|}}} {{#arrayprint: mapaddr|*}}|format=float|directional=no}}}}<!-- -->{{#subobject: |
|Is primary={{{Is primary|}}} | |Is primary={{{Is primary|}}} | ||
|Address label={{{Address label|}}} | |Address label={{{Address label|}}} | ||
Line 15: | Line 15: | ||
|Period from year={{#ifeq:{{{Is time bound|}}}|Yes|{{{Period from year|}}}}} | |Period from year={{#ifeq:{{{Is time bound|}}}|Yes|{{{Period from year|}}}}} | ||
|Period until year={{#ifeq:{{{Is time bound|}}}|Yes|{{{Period until year|}}}}} | |Period until year={{#ifeq:{{{Is time bound|}}}|Yes|{{{Period until year|}}}}} | ||
− | |Address string={{#arrayprint: mapaddr|*}} | + | |Note={{{Note|}}} |
− | |Coordinates={{#geocode:location={{ | + | |Address string={{{Building number|}}} {{#arrayprint: mapaddr|*}} |
+ | |Coordinates={{#if:{{{Latitude|}}} {{{Longitude|}}} | ||
+ | |{{{Latitude|}}},{{{Longitude|}}} | ||
+ | |{{#ifeq:{{#var:geo}}|Geocoding failed|{{#geocode:location={{{Zipcode|}}}, {{{State|}}}, {{{Country|United States of America}}}|format=float|directional=no}}}} | ||
+ | }} | ||
}}.</includeonly> | }}.</includeonly> |