fullstackreact/google-maps-react

Documentation should describe the parameters passed to Marker.onDragend

nickperkinslondon opened this issue · 3 comments

Documentation should describe the parameters passed to Marker.onDragend.
The handler gets 3 complex objects, and its not easy to figure-out what they are.

Hope it will help you: (it worked for me)

<Marker
    onDragend={this.moveMarker.bind(marker)}
</Marker>
   moveMarker(props, marker, e) {
        console.log(e.latLng.lat(), e.latLng.lng()) // get the new coordinates after drag end
    }

I don't have property name onDragend in Marker can you help me out with this?

@YaakovHatam

Hope it will help you: (it worked for me)

<Marker
    onDragend={this.moveMarker.bind(marker)}
</Marker>
   moveMarker(props, marker, e) {
        console.log(e.latLng.lat(), e.latLng.lng()) // get the new coordinates after drag end
    }

It was helpful !