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

suppressDeprecationWarnings #954

Open
zPuls3 opened this issue Mar 18, 2025 · 3 comments
Open

suppressDeprecationWarnings #954

zPuls3 opened this issue Mar 18, 2025 · 3 comments

Comments

@zPuls3
Copy link

zPuls3 commented Mar 18, 2025

Is there a way to use suppressDeprecationWarnings?

@usefulthink
Copy link
Contributor

Can you elaborate a bit? What is suppressDeprecationWarnings, is there an undocumented feature I don't yet know about?

Since the maps API will just use console.warn etc to print out the deprecation warnings, there probably isn't an easy way to remove them besides maybe overwriting the global console object (which I wouldn't recommend). Maybe you could open an issue in the Maps API issue tracker.

@zPuls3
Copy link
Author

zPuls3 commented Mar 20, 2025

My bad, I found in SO that you can use it at the google map script like this.

<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=marker&v=beta&suppressDeprecationWarnings=true"></script>

But I didnt look it up on documentation, because I use the vue 3 dependency so I couldnt use it like above.

My problem is that I use google.maps.Marker and I get a warning about it. So I would like to disable it.

Yes I don't want to mess with global console object at all. But thanks!

@usefulthink
Copy link
Contributor

Sounds like there are just those two options:

  • migrate to using the AdvancedMarker or
  • create a feature-request for the maps-API to add a suppressDeprecationWarnings option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants