visgl / visgl/react-google-maps
[Feat] Custom style to MapControl
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 193
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 13
Description
Target Use Case
I'm trying to make a "full height" MapControl.
Proposal
Ideally I would be able to pass in a custom style to the component, setting {bottom: "0px"}.
I managed with a workaround that seems very fragile:
const map = useMap();
useEffect(() => {
const control = map?.controls[position].getAt(0);
if (control?.style)
control.style.bottom = "0px";
}, [map, position]);
which works because it's the only component I will have in that position, but any other position I'm screwed 😅
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 at the MapControl component and its current control styling and positioning behavior. Determine how a custom style could set values such as bottom without depending on the first control in a position, then verify that styling works when multiple controls share positions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100