...
Excerpt | |||||
---|---|---|---|---|---|
Show a Google Maps link to the company headquarter, using the geo location (45.2, 42.8) as parameter: geolocation values, joined with a comma.
|
Setup in Picturepark
Layer: Corporate Information
Field: Headquarter Location
...
You cannot just access the Geo Point as a combined value. You must construct the point yourself in the Display Pattern, so check if the field has a value and then show latitude and longitude separated by a comma.
Use Case
Check if the Geo Point field has values, then assign the Latitude to a variable and Longitude to a variable. Then join the two variables with a comma and create a link using the constructed variable and a fixed link text.
Code Block | ||
---|---|---|
| ||
{% if data.corporateInformation.locationheadquarterLocation %} {% assign HqLocationHqLocationLat = data.corporateInformation.locationheadquarterLocation.lat | append: ,%} {% assign HqLocationLon =data.corporateInformation.locationheadquarterLocation.lon %} {% assign HqLocation = HqLocationLat + "," + HqLocationLon %} <a href="http://www.google.com/maps/place/" + HqLocation> Headquarter </a> {% endif %} |
...