I am using google-map-marker (in dom-repeat) with the event: on-google-map-marker-dragend.
I am trying to get the current position of the marker after the drag is completed, but I only get the position of the marker, where it was moved on the drag before the current drag.
<google-map zoom="15" id="map" style="height: 20em" api-key="[[apiKey]]" fit-to-markers>
<template is="dom-repeat" items="[[markers]]" as="mapMarker">
<google-map-marker on-google-map-marker-click="inform" on-google-map-marker-dragend="inform" click-events="true" draggable="true" drag-events="true" latitude="{{mapMarker.latitude}}" longitude="{{mapMarker.longitude}}">
</google-map-marker>
</template>
</google-map>
the method:
inform: function(event){
// this is not the current position after drag end...
console.log(event.model.mapMarker.latitude);
console.log(event.target.latitude);
this.$.userInformationLatitude.innerHTML = event.model.mapMarker.latitude;
this.$.userInformationLongitude.innerHTML = event.model.mapMarker.longitude;
}
Example for better understanding: I drag my marker from latitude:0 longitude:0 to New York, after the dragging is completed, I get the values latitude:0 longitude:0, not the longitude and latitude of New York.