Skip to content

[Feat] Custom style to MapControl #776

@stichiboi

Description

@stichiboi

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 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 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions