Skip to content

Bug or I'm doing something wrong? #836

Closed
@MrAmericanMike

Description

@MrAmericanMike

I am trying to access the StreetViewService once the API is loaded.

If I use the .load method (deprecated) like this:

	LOADER.load()
		.then((google) => {
			console.log(google);
			const SV = new google.maps.StreetViewService();
		})
		.catch((error) => {
			console.log(error);
		});

It works no issues, however when I do:

	LOADER.importLibrary("maps")
		.then(({ Map }) => {
			console.log(Map);
		})
		.catch((error) => {
			console.log(error);
		});

That Map object doesn't have StreetViewService method. I believe I came to this problem time ago, but can't remember if it was a limitation or if I'm doing something wrong.

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