Skip to content

using region: "US" causes the fetch to fail #815

Closed
@scdozer

Description

@scdozer

not sure whats going wrong, but adding region US causes the loader to break. i dont get back any good data, but a "ERR_BLOCKED_BY_CLIENT"

everything seems to work fine without, but hoping to get only USA addresses back

useEffect(() => { const initGoogleServices = async () => { try { const { AutocompleteService, PlacesService } = await new Loader({ apiKey: process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY || "", libraries: ["places"], region: "US", version: "weekly", }).importLibrary("places"); setAutocompleteService(new AutocompleteService()); // Must pass in a HTML div node, so we create a dummy node setPlacesService(new PlacesService(document.createElement("div"))); } catch (error) { console.log("hiiii"); console.error(error); } }; initGoogleServices(); }, []);

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage meI really want to be triaged.type: questionRequest for information or clarification. Not an issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions