I have been trying for days to get this to work with no joy so I was hoping someone could come to my rescue.
I have an airtable sheet that has some columms including Latitude and Longitude. I would like to plot those as markers on a map once the app starts. I have gone over all of the tutorials, videos and all the different code blocks I could find and have not had success.
Trying to iterate over the sheet does not put the markers on the map. Sometimes it crashes and sometimes not but still not location markers.
I am really at my wits end trying to get this to work. Any help would be greatly appreciated.
I know Jane (a thunkable employee) had this as a tutorial but it crashes the app when launching. I have tried many variations of that but they do not work. This is the link to her tutorial (Airtable Map (show image when Marker pressed))
Thanks for your reply, I really appreciate it. I tested what you suggested and the app crashes at launch both from the live test and installing the app to my phone. Here is the screenshot of my blocks after changing it.
I’d suggest you do a bit of error hunting. Add a label to your design and before the j-loop add an if error display error block. Then you’ll know if the problem is with getting the rows or adding the data to the map.
Then I’d use a very basic version of the Airtable (two or three rows) and test that.
Note that if any of your rows have empty latitude or longitude cells attempting to get that property will fail and the app will crash (because the property doesn’t exist). Empty rows will cause the same problem.
If having empty cells is unavoidable, you’ll need an error protection routine that gets the properties of j, checks if the required property exists and only gets it if it exists.
Hope that helps.
I added a display error block and label and they were coming up null when testing. Then I re-read what you said about empty rows crashing the app. After checking my airtable, I noticed that there was an empty blank row at the bottom of my sheet. Once I deleted that row and tested it worked!!! I can’t thank you all enough for helping me troubleshoot and fix this!
Do you have any blocks examples of this? I am thinking through it but can not seem to come up with the logic. I am not sure of which blocks will get me this check. It would actually have to check all rows for data, correct?
Here is what I have so far. The app doesn’t crash but I don’t get any markers either. There really only individual cells that will be blank at this point and not necessarily an entire row although I guess that could be the case at some point.