Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug or I'm doing something wrong? #836

Closed
MrAmericanMike opened this issue Feb 28, 2024 · 2 comments
Closed

Bug or I'm doing something wrong? #836

MrAmericanMike opened this issue Feb 28, 2024 · 2 comments
Labels
triage me I really want to be triaged. type: question Request for information or clarification. Not an issue.

Comments

@MrAmericanMike
Copy link

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.

@MrAmericanMike MrAmericanMike added triage me I really want to be triaged. type: question Request for information or clarification. Not an issue. labels Feb 28, 2024
@wangela
Copy link
Member

wangela commented Feb 28, 2024

If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 so we can see what is popular when we triage.

@MrAmericanMike Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

@MrAmericanMike
Copy link
Author

Sorry, just as I posted it, it hit me, I needed to importLibrary("streetView") in this case. Didn't know they were 2 seperate ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants