Hey guys so i’m trying to add lat
and lon
fields to a collection, but I’m getting stuck in the autovalue
part.
Any help will be greatly appreciated. What I have now:
FritkotSchema = new SimpleSchema({
location: {
type: Object,
index: '2dsphere',
label: 'Location',
autoform: {
type: 'hidden',
omit: true
}
},
'location.type': {
type: String,
allowedValues: ['Point'],
label: 'Star location type'
},
'location.coordinates': {
type: [Number],
minCount: 2,
maxCount: 2,
decimal: true,
autoValue: function () {
// [QUESTION]: What to add here ??
}
},
name: {
type: String,
label: 'Name'
},
address: {
type: String,
label: 'Address',
},
postCode: {
type: String,
label: 'PostCode'
},
gemeente: {
type: String,
label: 'Gemeente'
},
... omitted code