Does anyone has a custom field for geo-locations?

default discord avatar
wiesson
2 months ago
2

I'd like to have a address search field and a marker that I can point on a location to get the lat/lng coordinates. Does anyone has a custom component to do that?!

  • discord user avatar
    dribbens
    Payload Team
    2 months ago

    I'm sure somebody has though I haven't seen it yet.


    I would add a

    type: 'text'

    and is

    admin.hidden: true

    that is populated from a custom

    type: 'ui'

    that integrates with google maps or another 3rd party address/map tool for the address lookup. Then I would use form hooks to set a

    type 'point'

    field and any other fields you want to persist off the data you get in your ui field.


    This would make a nice tidy plugin if anyone is motivated to publish a package.

  • default discord avatar
    wiesson
    2 months ago

    Thanks! I'll have a look at that

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.