Skip to content

[Feature Request] Ease handling of complex full-screen possibilities in Google Maps adapter #730

@acorncom

Description

@acorncom

Is your feature request related to a problem? Please describe.
As outlined in #726 (comment), our Google Maps adapter applies relatively simplistic logic to determining appropriate coordinates for drawing when in full-screen mode. This has worked fine until now, but may snag folks in the future if they have a different containing element that has been set to full-screen mode and a Google Maps element that then fills almost all of that containing element.

Describe your proposed idea for the solution to this problem
Shift the a simplistic two-choice option that we do now:

const mapElement = document.fullscreenElement ?? this._map.getDiv();

to a protected method approach that gives an extension point for folks to build out in a custom adapter if needed:

const mapElement = getBoundingMapElement(this._map); // provide access to what is otherwise a private variable

// snipped ...

// allows custom adapter overrides where needed, document further
getBoundingMapElement(map) {
  return document.fullscreenElement ?? map.getDiv();
}

Describe alternatives you've considered
We could leave it for now and see if someone asks for it. But writing this up is fresh in our minds right now and I'm looking at use case for a client that may require this in the next few months, so thought I'd write it up now

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions