Sanity plugin providing input handlers for geo-related input types using Mapbox.
This plugin replaces the native Sanity geopoint type.
sanity-plugin-leaflet-input as an alternative.
-
sanity install mapbox-input -
Then write a valid Mapbox API token into
./config/mapbox-input.json -
npm start
Use the geopoint type in your schema. Ex:
export default {
name: 'article',
title: 'Article',
type: 'document',
fields: [
{
name: 'location',
type: 'geopoint',
title: 'Location',
},
],
}