react-google-maps icon indicating copy to clipboard operation
react-google-maps copied to clipboard

[Bug] Customed AdvancedMarker can't be dragged

Open asdeq20062 opened this issue 9 months ago • 0 comments

Description

                    <AdvancedMarker 
                        position={{lat: currentLocation?.lat, lng: currentLocation?.lng}}
                        draggable={true}
                    >
                        <Pin background="#0f9d58" />
                    </AdvancedMarker>

I found that this code does not allow the Pin element to be dragged. It should use gmpDraggable, but that property was omitted. I tested this using the raw Google Maps API, and confirmed that gmpDraggable works, whereas draggable does not.

Steps to Reproduce

                    <AdvancedMarker 
                        position={{lat: currentLocation?.lat, lng: currentLocation?.lng}}
                        draggable={true}
                    >
                        <Pin background="#0f9d58" />
                    </AdvancedMarker>

Environment

  • Library version:
  • Google maps version: weekly
  • Browser and Version:
  • OS:

Logs


asdeq20062 avatar Apr 24 '25 04:04 asdeq20062