Rendering the GeoPoint Field

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

Before Reading

This page assumes that you have retrieved your content and stored it in a variable named document

Retrieve the Latitude & Longitude Values

Here is an example of how to retrieve the latitude & longitude coordinates for a GeoPoint field. In this case, the API ID for the GeoPoint field is location.

Copy
const location = document.data.location;
 
const lat = location.latitude;  // latitude
const long = location.longitude; // longitude