> For AI agents: the complete Sanity documentation index is available at [https://www.sanity.io/docs/llms.txt](https://www.sanity.io/docs/llms.txt).

# Geopoint

Schema type reference for the geopoint type.

An object signifying a global latitude/longitude/altitude coordinate. Longitude and latitude is stored as decimal degrees, while altitude is stored as a floating point representing meters above sea level. See the [GeopointDefinition](https://reference.sanity.io/sanity/index/GeopointDefinition/) reference for the full type definition.

## Properties

#### Properties

**type** (required)

Value must be set to geopoint.

**name**

Required. The field name. This will be the key in the data record.

**title**

Human readable label for the field.

**hidden**

If set to true, this field will be hidden in the studio. You can also return a callback function to use it as a conditional field.

**readOnly**

If set to true, this field will not be editable in the content studio. You can also return a callback function to use it as a conditional field.

**description**

Short description to editors how the field is to be used.

**initialValue**

The initial value used when creating new values of this type. Can be a literal value, or a resolver function that returns a literal value or a promise that resolves to one.

**components**

Lets you provide custom components to override the studio defaults in various contexts. The available keys are annotation, block, diff, field, inlineBlock, input, item, and preview.

**deprecated**

Marks a field or document type as deprecated in the studio interface and displays a user-defined message defined by the single required reason property.

If you deploy a GraphQL API schema, this property will translated into the @deprecated directive.

**icon**

Supply a custom icon for this field. See icons documentation for more information.

**options** (Object)

Visual options for the geopoint field in Studio. See the full list available in the GeopointOptions type.



## Validation ([GeopointRule](https://reference.sanity.io/sanity/index/GeopointRule/))

#### Properties

**required()**

Ensures that this field exists.

**skip()**

Discards the validation rules set before it in the chain and makes the field optional. Rules chained after it still apply.

**custom(fn)**

Creates a custom validation rule.

**error(message)**

Sets a custom error message for the preceding validation rule.

**warning(message)**

Sets a custom warning message for the preceding validation rule. Warnings do not prevent publishing.

**info(message)**

Sets a custom info message for the preceding validation rule. Info messages are purely informational and do not prevent publishing.

**valueOfField(path)**

Gets the value of a sibling field to use in validation. Useful for creating validation rules that depend on the value of another field.

Input

```javascript
{
  title: 'Launchpad Location',
  name: 'location',
  type: 'geopoint'
}
```

Response

```json
{
  "_type": "geopoint",
  "lat": 58.63169011423141,
  "lng": 9.089101352587932,
  "alt": 13.37
}
```

While the `geopoint` type is available in Sanity by default, you will probably want to install a plugin that provides a more visual way to input the coordinates. For instance, you could use the [@sanity/google-maps-input](https://www.npmjs.com/package/@sanity/google-maps-input) plugin:

**npm**

```shell
cd my-project
npm install --save @sanity/google-maps-input
```

**pnpm**

```shell
cd my-project
pnpm add @sanity/google-maps-input
```

**yarn**

```shell
cd my-project
yarn add @sanity/google-maps-input
```

**bun**

```shell
cd my-project
bun add @sanity/google-maps-input
```

Then add the plugin to your `sanity.config.ts|js` with your Google maps API key:

```typescript
import { googleMapsInput } from "@sanity/google-maps-input";

export default defineConfig({
  // ...
  plugins: [
      googleMapsInput({
          apiKey: "my-api-key"
     })
  ] 
})
```

Make sure the key has access to all of the following APIs:

- Google Maps JavaScript API
- Google Places API Web Service
- Google Static Maps API

You can create such keys and grant API access in the [Google Developer Console](https://console.developers.google.com/apis).

> [!WARNING]
> Gotcha
> *Be careful with your API keys*. If you use this functionality, it's a good idea to make your repository private.



## Related changelog entries

Entries are listed newest first; each link points to the full entry as markdown. Follow one when you need to know what changed, when, or why — for example, to summarize recent updates, explain behavior that differs from older documentation, or check whether a fix has shipped.

- [Sanity Studio v6.1.0: Improved Content Release error highlighting, and bugfixes for Visual Editing with Portable Text](https://www.sanity.io/docs/changelog/studio-Ni4wLjA.md) — June 16, 2026
- [Sanity Studio v3.26.0: Deprecation Support for Documents and Fields, Comment Reactions ++](https://www.sanity.io/docs/changelog/5a99e214-6088-4d10-a0b7-14ca7c555c01.md) — January 23, 2024
- [Sanity Studio v2.17.0: Conditional Fields](https://www.sanity.io/docs/changelog/10aba481-ece9-4b41-b0e2-6b8e75e375c9.md) — August 26, 2021