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

[Feat] Custom style to MapControl

Open stichiboi opened this issue 8 months ago • 0 comments

Target Use Case

I'm trying to make a "full height" MapControl.

Image

Proposal

Ideally I would be able to pass in a custom style to the <MapControl> 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 😅

stichiboi avatar Jun 14 '25 08:06 stichiboi