GeoPoint Templating

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

Usage

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

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

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

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

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