title: google.maps.LatLng returns a function which returns 'a'. Why?
body: <p>I created a function to draw multiple markers from an object on a map. Each marker gets also pushed in an array to access it later.</p>
  
  <p>My createMarker function looks like this and gets called in the initMap function:</p>
  
  <pre><code>function createMarker(markerData){
  for(var i = 0; i &lt; markerData.length; i++){
  
      var testing = new google.maps.LatLng(parseFloat(markerData[i].lat), parseFloat(markerData[i].lng));
  
      console.log(testing);
  
      var marker = new google.maps.Marker({
          animation: google.maps.Animation.DROP,
          position: new google.maps.LatLng(parseFloat(markerData[i].lat), parseFloat(markerData[i].lng)),
          map: myMap
      });
  
      markerBounds.extend(marker.position);
      markerArray.push(marker);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>But my problem is, that the console log only returns:</p>
  
  <pre><code>function (){return a}
  </code></pre>
  
  <p>and not the expected lat lng object. So in my markerArray there are no lat lng coordinates also. But the markers are still created on the map.</p>
  
  <p>Later I want to compare each marker position from markerArray with the current user position. But I think this isn't working, because the problem described above.</p>
  
  <pre><code>for (var i = 0; i &lt; markerArray.length; i++) {
      var markerPosition = new google.maps.LatLng(parseFloat(markerArray[i].lat), parseFloat(markerArray[i].lng));
      if(google.maps.geometry.spherical.computeDistanceBetween(userPosition, markerPosition) &lt; radius){
          console.log('test');
      }
  }
  </code></pre>
  
  <p>I did a research on this but could not find an answer. The only info I got is about asynchronous functions.</p>
  
  <p>I hope you can understand the problem. :)</p>