I'm trying to extract latitude and longitude from photo attachment EXIF data but can't seem to find it.
The code below gets me some information from the first photo attachment, but latitude and longitude are not in there. I also have python scripts for retrieving it which works well and shows that the images in question do have that info in the XIF. What the exifInfo method on an attachment returns in Arcade seems to be rather stripped down - tag numbers don't appear at all so what I'm getting is incomplete. Am I missing something?
Make: Apple (Apple)
Model: iPad (A16) (iPad (A16))
Orientation: 8 (Left side, bottom (Rotate 270 CW))
X Resolution: 72 (72 dots per inch)
Y Resolution: 72 (72 dots per inch)
Resolution Unit: 2 (Inch)
Software: 18.5 (18.5)
Date/Time: 2026:01:05 09:00:53 (2026:01:05 09:00:53)
Host Computer: iPad (A16) (iPad (A16))
var atts = attachments($feature, {metadata: True});
var exif;
var cnt;
var strOut = "";
if (count(atts) > 0 ) {
exif = atts[0].exifInfo
cnt = Count(exif[0]['tags'])
for (var n=0; n<cnt; n++){
strOut += Text(exif[0]['tags'][n]['name'])
strOut += ": "
strOut += Text(exif[0]['tags'][n]['value'])
strOut += '    (' + Text(exif[0]['tags'][n]['description']) + ')'
strOut += '<BR>'
}
}
return {
type : 'text',
text : strOut //this property supports html tags
}