title: Save the users location in Meteor
body: <p>My problem is to search and display all the register users nearby some meter. After googling a lot without find a good solution I start writing very simple code (I use mdg:geolocation).</p>
  
  <p>main.js</p>
  
  <pre><code>// in the client side
  Template.localPosition.helpers({
      'getLocalPosition': function(){
          var currentUserId = Meteor.userId();
          if( currentUserId ) { 
              var localPos = Geolocation.latLng();
              return "LAT:" + localPos.lat + " LNG:" + localPos.lng;
          }
      }
  });
  </code></pre>
  
  <p>In main.html I display a 'localPosition' template with <code>{{getLocalPosition}}</code> call. It work, but in the console panel I have:</p>
  
  <blockquote>
    <p>Exception in template helper: TypeError: Cannot read property 'lat' of null</p>
  </blockquote>
  
  <p>Why is this?</p>