@hatchd/sanity-plugin-get-coordinates
v1.2.0
Published
A plugin for Sanity Studio, an input component to get coordinates from a street address.
Downloads
625
Readme
Get Coordinates! A Sanity Studio plugin
Enter 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.
Installation
npm install @hatchd/sanity-plugin-get-coordinates
Usage
Add it as a plugin in sanity.config.ts
(or .js):
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:
{
title: "Location Coordinates",
name: "location",
type: "coordinates"
}