Auto-populate values from other options (Maps, Star maps...)
This article will show you how to set these following cases using the "Populate values from other options" feature:
Auto-fill coordinates (latitude, longitude) or place name from Maps to a text field
Auto-fill coordinates, place name, or time from Star maps to a text field
In this example, if the Map Location is set to Berlin, Germany, both the text field and the Live Preview will automatically set to Berlin, Germany as well.
To do so, please follow these steps:
Create a text layer > Enable personalization
Select Populate values from other options
Continue to select the Layer you want to get value from. In this case, it would be the Street Map layer
Select the type of value you want to get. You can click on the Lookup values button for more details.
At the moment, we support these values:
For Street Maps & Star Maps:
To limit the length of a coordinates, you can follow the formats below, where you replace "X" with the max number of decimals you want to show. X can vary from 0 (integer) to 15.
{{lat.X}}, {{lng.X}}
{{lat:dd.X}}, {{lng:dd.X}}
{{lat:dms.X}}, {{lng:dms.X}}
{{lat:dmm.X}}, {{lng:dmm.X}}
(eg. {{lat.10}} returns “21.0294834999” {{lat:dms.4}} returns “21°1'46.1406"N”, {{lat:dmm.0}} “21°2'N”)
Since you want to get the place name value, then you can copy and paste the {{place_name}} value there.
Tips: You can also enter a custom text there along with the custom value
Check your results on the Storefront:
Please keep in mind that you can also combine different custom values if you want as well!
NOTES:
Customers can still edit the text field anytime, even after it's been filled.
If the Customers change the map location again, the text field will be updated with the new values, which could override any custom info they added before.
Auto-fill coordinates (latitude, longitude) or place name from Maps to a text field
Auto-fill coordinates, place name, or time from Star maps to a text field
In this example, if the Map Location is set to Berlin, Germany, both the text field and the Live Preview will automatically set to Berlin, Germany as well.
To do so, please follow these steps:
1. Create a text field
Create a text layer > Enable personalization
Select Populate values from other options
Continue to select the Layer you want to get value from. In this case, it would be the Street Map layer
2. Enter values
Select the type of value you want to get. You can click on the Lookup values button for more details.
At the moment, we support these values:
For Street Maps & Star Maps:
Format | Meaning | Example |
---|---|---|
{{lat}} | Return the Latitude of the selected location in plain number (max 7 decimals). | 21.0283271 |
{{lng}} | Return the Longitude of the selected location in plain number (max 7 decimals). | 105.8528432 |
{{name}} | Return the Search keyword that buyers entered. | Central Park NY |
{{place_name}} | (only work with Street Maps) Return the full Location that buyers selected. | Central Park, New York, New York 10005, United States |
{{time}} | (only work with Star Maps) Return the Date & time that buyers selected. Use "Date picker" format for the text field to show date only. | 2024-11-07T12:31 |
Additional formats: | ||
{{lat:dd}}, {{lng:dd}} | Return the Latitude & Longitude in Decimal Degrees format (max 7 decimals). | 21.0285°N, 105.8544°E |
{{lat:dms}}, {{lng:dms}} | Return the Latitude & Longitude in Degrees, Minutes, and Seconds format (max 2 decimals). | 21°01'42.6"N, 105°51'15.9"E |
{{lat:dmm}}, {{lng:dmm}} | Return the Latitude & Longitude in Degrees and Decimal Minutes format (max 3 decimals). | 21°01.710'N, 105°51.265'E) |
To limit the length of a coordinates, you can follow the formats below, where you replace "X" with the max number of decimals you want to show. X can vary from 0 (integer) to 15.
{{lat.X}}, {{lng.X}}
{{lat:dd.X}}, {{lng:dd.X}}
{{lat:dms.X}}, {{lng:dms.X}}
{{lat:dmm.X}}, {{lng:dmm.X}}
(eg. {{lat.10}} returns “21.0294834999” {{lat:dms.4}} returns “21°1'46.1406"N”, {{lat:dmm.0}} “21°2'N”)
Since you want to get the place name value, then you can copy and paste the {{place_name}} value there.
Tips: You can also enter a custom text there along with the custom value
Check your results on the Storefront:
Please keep in mind that you can also combine different custom values if you want as well!
NOTES:
Customers can still edit the text field anytime, even after it's been filled.
If the Customers change the map location again, the text field will be updated with the new values, which could override any custom info they added before.
Updated on: 25/12/2024
Thank you!