title: Getting coordinates of marker in Google Maps API
body: <p>I'm using Google Maps API. And I'm using the code below to get the coordinates of the marker.</p>
  
  <pre><code>var lat = homeMarker.getPosition().$a;
  var lng = homeMarker.getPosition().ab;
  </code></pre>
  
  <p>Everything is working fine with the app that I built using Google Maps.
  But I tested it today and I got problems getting the correct coordinates. Only to discover that the code above is getting undefined. After I console.log(homeMarker.getPosition()) I discovered that this is now the variables that they used for the coordinates.</p>
  
  <pre><code>var lat = homeMarker.getPosition().ab;
  var lng = homeMarker.getPosition().cb;
  </code></pre>
  
  <p>I won't ask why Google Maps acts this way but you can also include it in your answer. My question is that how do I properly get the coordinates without changing my code everytime google maps changes the variables that they're using.</p>