visgl / visgl/react-google-maps
[Bug] Customed AdvancedMarker can't be dragged
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 193
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 13
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the AdvancedMarker component's handling of the draggable prop and compare it with the Google Maps API behavior described in the issue. Reproduce the custom Pin example and verify that dragging works through the gmpDraggable behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100