Difference between revisions of "Template:Coordinates"
(Created page with "<includeonly>{{#vardefine: city | {{#if: {{{city|}}} | {{{city}}}, }} {{#if: {{{province|}}} | {{{province}}} | BE }} }}{{#vardefine: address | {{#if: {{{address|}}} | {{{addr...") |
|||
Line 4: | Line 4: | ||
| {{#if: {{{address|}}} | {{{address}}}, }} {{#var: city}} | | {{#if: {{{address|}}} | {{{address}}}, }} {{#var: city}} | ||
}}{{#if: {{{venue|}}} | }}{{#if: {{{venue|}}} | ||
− | | {{#vardefine: coords | + | | {{#vardefine: coords |
− | | {{#geocode: {{{venue}}}, {{#var:address}} }} | + | | {{#geocode: {{{venue}}}, {{#var:address}} }} <!-- try address with venue --> |
}} | }} | ||
}}{{#ifeq: {{#var: coords|Geocoding failed}} | Geocoding failed | }}{{#ifeq: {{#var: coords|Geocoding failed}} | Geocoding failed | ||
− | | {{#vardefine: coords | + | | {{#vardefine: coords |
− | | {{#geocode: {{#var:address}} }} | + | | {{#geocode: {{#var:address}} }} <!-- try address without venue --> |
}} | }} | ||
}}{{#ifeq: {{#var: coords|Geocoding failed}} | Geocoding failed | }}{{#ifeq: {{#var: coords|Geocoding failed}} | Geocoding failed | ||
− | | {{#vardefine: coords | + | | {{#vardefine: coords |
− | | {{#geocode: {{#var:city}} }} | + | | {{#geocode: {{#var:city}} }} <!-- try without address (city / province only) --> |
}} | }} | ||
}}{{#ifeq: {{#var: coords|Geocoding failed}} | Geocoding failed | }}{{#ifeq: {{#var: coords|Geocoding failed}} | Geocoding failed |