0

I have a google maps application which is responsible get some information about a draggable marker. I would like to update the locality when this marker is moved.

So, I can update the latitude and longitude, but the locality I don't know how to do it. I'm using jquery-addresspicker and all methods that I'm using are here. That's what I did:

Added a listener on markerMoved method
google.maps.event.addListener(this.gmarker, 'dragend', $.proxy(this._markerMoved, this));

_updatePosition: function(location) {
  if (this.lat) {
    this.lat.val(location.lat());
  }
  if (this.lng) {
    this.lng.val(location.lng());
  }
  if (this.locality) {
    this.locality.val(??????);
  }
},

_markerMoved: function() {
  this._updatePosition(this.gmarker.getPosition());
}
.
.

Thanks in advance!

4

0 回答 0