Difference between revisions of "Template:Location"
Jump to navigation
Jump to search
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#arraydefine: mapaddr | <includeonly>{{#arraydefine: mapaddr | ||
− | |{{#arraymap: Street,City,State|,|@@@|{{#if: {{{@@@|}}}|{{{@@@|}}}, }}|}}{{{Country|United States of America}}} | + | |{{#arraymap: Street,City,Zipcode,State|,|@@@|{{#if: {{{@@@|}}}|{{{@@@|}}}, }}|}}{{{Country|United States of America}}} |
|* | |* | ||
− | }} | + | }}<!-- -->{{#vardefine: geo|{{#geocode:location={{{Building number|}}} {{#arrayprint: mapaddr|*}}|format=float|directional=no}}}}<!-- -->{{#subobject: |
− | {{# | ||
− | | | ||
− | }}<!-- -->{{#subobject: | ||
|Is primary={{{Is primary|}}} | |Is primary={{{Is primary|}}} | ||
|Address label={{{Address label|}}} | |Address label={{{Address label|}}} | ||
Line 20: | Line 17: | ||
|Note={{{Note|}}} | |Note={{{Note|}}} | ||
|Address string={{{Building number|}}} {{#arrayprint: mapaddr|*}} | |Address string={{{Building number|}}} {{#arrayprint: mapaddr|*}} | ||
− | |Coordinates={{#if:{{{Latitude|}}} {{{Longitude|}}}|{{{Latitude|}}},{{{Longitude|}}}|{{# | + | |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> |