Fields Point incorrect order

default discord avatar
adams
5 months ago
2

Hey guys, for field point the order should be Latitude,Longitude because currently it's Longitude and Latitude, and I need to reverse when I need to supply coordinate to google maps or OSM



Is there anyway to fix this? will propose PR if it's needed



Cheers.

  • discord user avatar
    denolfe
    Payload Team
    5 months ago

    This is the standard order for GeoJSON fields in MongoDB.

    https://www.mongodb.com/docs/manual/reference/geojson/

    That being said, how are you supplying the coordinates to Google Maps or OSM? I would expect there to be an opportunity to reorder these before being sent?



    You could possibly use an afterRead hook to modify the data, but this may have implications in the Admin UI.

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.