How do I create a location object in Cloudkit JS? I'm assuming I'm using the right terminology here.
Below is me creating the record object - you can see the place holder for location there.
Separate I have latitude and longitude.
var record = {
recordType: "Camera",
fields: {
title: { value: self.newCameraTitle() },
url: { value: self.newCameraURL() },
location: { value: location }
}
};
This specifies the contens and mandatory items... I'd need to know how to create the location object.
My attempt at this has been unsuccessful.
var location = {
recordType: "location",
fields: {
latitude: {value: self.newCameraLatitude()},
longitude: {value: self.newCameraLongitude()}
}
};
- David