visgl / visgl/react-google-maps

[Bug] Customed AdvancedMarker can't be dragged

Open
#746 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.