title: JavaScript object method returns null property
body: <p>It is friday, so maybe I don't think clearly, but - I have following code:</p>
  
  <pre><code>var map = {
      myLatLng: null,
      init: function(){
          navigator.geolocation.getCurrentPosition(function (position) {
              this.myLatLng = {lat: position.coords.latitude, lng: position.coords.longitude};
              console.log(this.myLatLng);
          });
      },
      drawRouteTo: function(destination){
          console.log(this.myLatLng);
      }
  }
  </code></pre>
  
  <p>Than I use </p>
  
  <pre><code>map.init();
  //and after some time - on click event
  map.drawRouteTo("some address");
  </code></pre>
  
  <p>and the output is:</p>
  
  <pre><code>Object { lat: 50.0575, lng: 19.9802 }
  null
  </code></pre>
  
  <p>Why is the second log returning null value? I should propably use classes and do not stick to the old patterns but I am still wondering why isn't it working.
  Is it something wrong with the assigment itself ? </p>
  
  <p>EDIT:
  I have updated fiddle here: <a href="https://jsfiddle.net/t1jdxmb8/1/" rel="nofollow noreferrer">https://jsfiddle.net/t1jdxmb8/1/</a>
  This should have fixed running this in scope of a callback but it does not work either</p>