Skip to content

Provide a way to set map id. #1070

Open

Description

@TikYengibaryan

Is your feature request related to a problem? Please describe 🙏
I've some default styling in my GCP and want to access it with mapId. I can do it with pure js and GCP API, but can't realize it with google-map-react, google-map-react doesn't provide a way to do so.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like 🤔
I would like to give mapId in options property.
A clear and concise description of what you want to happen.

Describe alternatives you've considered ✨

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

Activity

  1. benjamincurrie commented on Nov 4, 2021

    @benjamincurrie

    Also looking at adding themes to maps, would definitely appreciate the ability to set mapId in order to do this.

  2. jakeFeldman commented on Jan 9, 2022

    @jakeFeldman

    You can add mapId to the options prop. If using typescript it's not defined in the types package and there is a warning in the console since mapId should not be used in conjunction with styles, but the map renders correctly. I've added a PR in this repo to remove the styles object and another PR in the typed repo to support the key on the MapOptions type

    Hope that helps.

    GoogleMapReact: #1086
    TypeDefs: DefinitelyTyped/DefinitelyTyped#58072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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