Trying to use "this" to refer to a class's instance variable inside a function within the class's method in JavaScript
The "that" solution works well, but you can also bind your function to this :

function UserGoogleMap($mapElement) {
  this.$mapElement = $mapElement;
  this.map = {};
  this.marker = null;
  this.coords = new google.maps.LatLng(25.2697, 55.3095) 

  this.initMap = function () {
    google.maps.event.addListener(this.marker, 'dragend', function() {
      console.log(this.marker);
      pos = this.marker.getPosition();
      $('#google-map-info').html("Latitude:" + pos.lat() + " Longitude: " +  pos.lng());
    }.bind(this));
  }
}


There is a way to execute initMap directly :

this.initMap = function () {
  google.maps.event.addListener(this.marker, 'dragend', function() {
    pos = this.marker.getPosition();
      $('#google-map-info').html("Latitude:" + pos.lat() + " Longitude: " +  pos.lng());
    }.bind(this));
    return arguments.callee;
 }();


But arguments.callee is deprecated (due to performance issues), so calling initMap manually is better.