Search code examples
sanity

Is it possible to set default geopoint in the sanity.io?


I have a field:

{
  name: 'location',
  title: 'Map',
  type: 'geopoint'
}

and I use @sanity/google-maps-input. It is great, but default localization is New York. How can I change it to another location?


Solution

  • It is possible in the file config/@sanity/google-maps-input.json

    {
      "apiKey": "XYZ",
      "defaultZoom": 11,
      "defaultLocation": {
        "lat": 40.7058254,
        "lng": -74.1180863
      }
    }