Skip to content

Dynamically change the language of Loader #210

Description

@mcAnastasiou

Environment details

  1. google.maps.places.AutocompleteService
  2. "@googlemaps/js-api-loader": "^1.11.2",

Steps to reproduce

I load the library as follows

    new Loader({
        apiKey: process.env.REACT_APP_GOOGLE_PLACES_API_KEY,
        libraries: ['places'],
        language: selectedLanguage,
    });

I can dynamically change the language through a dropdown. If i try to reload the library i get an error that says i cannot use the same api key with different params

How can i dynamically change the results of the autocomplete to the desired language?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions