Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Custom Point Field

default discord avatar
thacac31330last year
8

Hello all, I'm looking for this for such a long time, but I'm creating a custom field based on the "point" type field which could be fed by clicking a a leaflet map...



I succeeded in creating the map and getting interactions but, I don't find the "basic" point field definition anywhere to use the component in my custom field...do I have to use 2 inputs fields to rebuild a kind of point field?



I thinks there's something I don't uderstand ;/



I'm quite surprised to find se few info about field extension/custo and specially that Point Field... If somebody can help that would be GREEEEAAT 🙂



thanks

  • default discord avatar
    herb3763last year

    I can't really help but does anything in this help?

    https://payloadcms.com/community-help/github/geospatial-queries-field
  • default discord avatar
    thacac31330last year

    for info, I made it, some adjustment still on going but I found the trick



    I've a map on which you can click and drag a marker to get the coords in bdd/api



    I think this is a good base to extend with address getter api etc



    this is not under "plugin" yet



    txs to all

  • default discord avatar
    banks0last year

    Did you make this public? Im having the same issue



    I want to make a leaflet custom field

  • default discord avatar
    thacac31330last year
    @779076714797334569

    not yet I'll try to put the custom field in a repo Just for sharing as a gist

  • default discord avatar
    muperdevlast year

    hey mate, how you doin, do you have any refrence to that so I can use it for my client since he needs it ASAP?



    @710575238647251014
  • default discord avatar
    thacac31330last year

    @banks,

    @599971721490989117

    I've set a repo here :

    https://github.com/thacac/payload-with-map/tree/main
  • default discord avatar
    muperdevlast year
    @779076714797334569

    that's nice of you

  • default discord avatar
    thacac31330last year

    here if the field : payload-with-map/src/payload/fields


    /mapPoint/



    if you have some improvement to set, please do it ^^ this is a first working version, I hadn't time to go deeper (for example for have a good behavior on marker drag on the map)

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.