Display Pattern: Geo Point

Summary

 

Show a Google Maps link to the company headquarter, using the geolocation values, joined with a comma.

{% if data.corporateInformation.headquarterLocation %} {% assign HqLocationLat = data.corporateInformation.headquarterLocation.lat %} {% assign HqLocationLon =data.corporateInformation.headquarterLocation.lon %} {% assign HqLocation = HqLocationLat + "," + HqLocationLon %} <a href="http://www.google.com/maps/place/" + HqLocation> Headquarter </a> {% endif %}

Setup in Picturepark

  • Layer: Corporate Information

  • Field: Headquarter Location

Field Value Access

data.corporateInformation.headquarterLocation.lon
data.corporateInformation.headquarterLocation.lat

  • 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.

{% if data.corporateInformation.headquarterLocation %} {% assign HqLocationLat = data.corporateInformation.headquarterLocation.lat %} {% assign HqLocationLon =data.corporateInformation.headquarterLocation.lon %} {% assign HqLocation = HqLocationLat + "," + HqLocationLon %} <a href="http://www.google.com/maps/place/" + HqLocation> Headquarter </a> {% endif %}





FotoWare Switzerland AG - CH-5033 Buchs - Switzerland
https://picturepark.com - support@picturepark.com
© 2023 FotoWare Switzerland AG