Templating the GeoPoint field

The GeoPoint field is used for Geolocation coordinates. It works by adding coordinates or by pasting a Google Maps URL.


Here is an example of how to integrate the GeoPoint field into your templates.

  • ejs
  • pug
  • pug (API v1)
<% var latitude = document.data.location.latitude %>
<% var longitude = document.data.location.longitude %>

<p>My location: <%= latitude %>, <%= longitude %></p>
- var lat = document.data.location.latitude
- var long = document.data.location.longitude

p My location: !{lat}, !{long}
- var lat = document.getGeoPoint('store.location').latitude
- var long = document.getGeoPoint('store.location').longitude

p My location: !{lat}, !{long}

Was this article helpful?
Not really
Yes, Thanks

Can't find what you're looking for? Get in touch with us on our Community Forum.