Sanity Studio input for geopoint fields: OpenStreetMap-based map tiles,
Photon place search, and a draggable pin.
pnpm add @eightmedia/sanity-plugin-osm-inputimport { OsmGeopointInput } from '@eightmedia/sanity-plugin-osm-input'
import { defineField } from 'sanity'
defineField({
name: 'location',
type: 'geopoint',
components: { input: OsmGeopointInput },
})import { osmInput } from '@eightmedia/sanity-plugin-osm-input'
import { defineConfig } from 'sanity'
export default defineConfig({
plugins: [osmInput()],
})Same as Sanity’s built-in geopoint:
{ _type: 'geopoint', lat: number, lng: number }- Tiles: OpenStreetMap France
- Search: Photon (Komoot)
We use pnpm, npm or yarn should also work if you update package.json.
nvm use # Node 24
pnpm install
pnpm test
pnpm buildFor local development and testing, a minimal Studio
is set up in the repo root.
Copy .env.example to .env and fill the blanks, then run a
studio at localhost:3333 like this:
pnpm run dev