A plugin for Sanity Studio, an input component to get coordinates from a street address.
npm install @hatchd/sanity-plugin-get-coordinatesEnter an address and get coordinates for it. The coordinate can be used with your map services on the front end.
This is a Sanity Studio v3 plugin.
``sh`
npm install @hatchd/sanity-plugin-get-coordinates
Add it as a plugin in sanity.config.ts (or .js):
`ts
import {defineConfig} from 'sanity'
import {getCoordinates} from '@hatchd/sanity-plugin-get-coordinates'
export default defineConfig({
//...
plugins: [getCoordinates()],
})
`
In your document schemas, add it as a 'coordinates' type. For an example:
`ts``
{
title: "Location Coordinates",
name: "location",
type: "coordinates"
}