0

I have tried many thing to get coordinates from marker i am using google-maps-react module and there is only 3 props available in it mapCenter onClick onMouseover But i want to get coordinates when i drag marker.

Following is code working and marker is draggable but how can i found coordinates?

                            <Marker draggable={true}

                                position={this.state.initialRegion}

                            />

                        </Map>
  • shouldn't there be an `onDragend` props? It does say (though abit ambiguous) on the docs about `Marker` subcomponent "The component listens for events, similar to the component.". Here's another SO post that supports my comment: https://stackoverflow.com/questions/51495060/google-maps-react-get-marker-position-on-drag-end/51496164 – Ray Jonathan Jun 19 '19 at 09:57
  • Thanks for giving me guidance but unfortunately i can able to get lat lng from the props when i drag marker i have tried different thing but can't get the result – Rafae Khatri Jun 21 '19 at 11:40
  • Maybe you could update ur question to reflect the things u have tried (i.e. the one u tried using the onDragEnd) so that Stack Overflow community can help u better :) – Ray Jonathan Jun 24 '19 at 03:41

0 Answers0