meteor/mobile-packages

mdg:geolocation SesionSet.get('geoLocation') returns empty object

Closed this issue · 1 comments

if(Meteor.isClient) {

Tracker.autorun(function() {
var g = Geolocation.currentLocation();
if(g) {
console.log('set', g);
Session.set('g',g);
console.log('get', Session.get('g'));
}
});

The console outputs are as follow:
set Geoposition {}
get Object {}

Setting the geolocation object in a Session does not work.
Can someone take a look :)

You have to call the the currentLocation() inside of a helper or autorun. Check the solomo example on the github page!