Geo Points from Address's in CSV upload

Options
I'm sure this has been brought up before? If not, allow me. Xano is unbelievably cool btw. So, I could go ahead and make a post endpoint and cycle thru my csv with some library on the frontend im sure.. but would there be a way for me to specify geo point on a mapped address column, and have it done for me on upload..? That is, my csv address column will be all legitimate addresses, and Xano harnesses the add point functionality it already has but applied to CSV upload.. 

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     - this what a geo-coding API would do such as Google Maps API. Xano doesn't store a database full of addresses and longitudes and latitudes. This is what services such as Google Maps does. 

    In our spreadsheet view, for example, when you pick a location you are actually using Google Maps. We integrated that to the database for convenience. 
  • Phillip Rousu
    Options
     Shucks, I figured you guys were already geocoding one at a time, might as well bulk geocodes as well!
  • Phillip Rousu
    Options
     hey, so im going the manual route, looks like i cant set a geo_point anyway... see screenshot.. theres nowhere in the dropdown to specify geo_point data type.

    Explanation: Grab all records where jobAddressPoint === null, loop and call geoCode api, and right here is where I need to construct the geo_point data type with each response's data (in the loop), i got a lat and long pair, i just need to update the null jobAddressPoint field[Screen Shot 2022-03-30 at 8.24.37 AM.png]
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     awesome solution! 
  • Phillip Rousu
    Options
     lol no, I am trying to say it doesn't work! I cant set geo_point in a patch/put.. I don't have a geo_point option in that dropdown... bug?
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     - I see. You'd need to input a geo_point structure JSON like is in our documentation

    {
        "type": "point",
        "data": {
          "lng": a,
          "lat": b
        }
      }

    You could build this format in a variable for each iteration. and map that to your geo_point field
  • Phillip Rousu
    Options
     Good stuff, thanks, i'll see if that works