Location on Documents
Intro
You might want to set a location for a document. This feature has the benefit of being searchable on a map, and the user can directly see where somebody created this document. We primarily introduced this feature for the mobile app to link images with their creation location.
Setting Locations on Documents
Setting a location on a document is currently only supported when you create a new document and via the GPS Locations.
As an example of how the mutation could look like if you create a file document:
mutation CreateDocumentFile($file: Upload!, $lat: Float, $long: Float) {
createDocumentFile(file: $file, location: {latitude: $lat, longitude: $long}) {
id
location {
id
longName
latitude
longitude
}
}
}
This mutation will give you a location object in the document with the lat long and a name. This name won't include the house number due to issues with the precision of the GPS on phones, as it often was the house next door.
If you upload an image with Exif data that includes a location, we try to read and use that too if you do not provide a different location via the mutation.