-
Notifications
You must be signed in to change notification settings - Fork 63
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
Reset/Delete/Clear #100
Comments
@jpoehnelt Does this issue related to browser warning : I am wondering if there is any cleanup function to avoid this warning.(I am currently using this library in my NextJS project and try to clean up when component unmounted). I've found there is Hope I am at the right window... |
I'll change that message to be more specific. The issue is that the loader was called twice which is ok, but the same key, libraries, etc must be used. This could be related to #5 for libraries. |
I would love to see this. I'm trying to validate a API key for use with the Maps Javascript API and there's no way to do it other than loading the script, try to create a map and wait for gm_authFailure. So, if the API key is invalid and a new one inserted I have to reload the script and try the map again. |
Which aspect are you trying to validate with the API key?
related: https://cloud.google.com/sdk/gcloud/reference/alpha/services/api-keys/describe |
@jpoehnelt On the client side I'm trying to: make sure the key has access to the Javascript API ( https://developers.google.com/maps/documentation/javascript ) I already have something to check other libraries like the places API where I try to call the AutocompleteService and if it fails it probably means the key does not have access to the places API. |
Here workaround: if (loader) {
loader.reset()
delete window.google
Loader.instance = undefined
} |
@jpoehnelt Do we have any method to validate the API key in the criteria you mentioned here? Instead of calling map library, I want to validate because, sometimes the key will be a valid one but it doesn't have access to the library, right?! Can you please help!! |
@jpoehnelt When i switch between these three routes, the memory allocation keeps stacking with 20mb per route switch, because it seems webgl.js doesnt do proper cleanup even if i clear and reset all references in my own src files. I think a Reset/Delete/Clear feature could help me clean up this memory leak aswell. Preferably in away that doesnt double api calls. If you want to test it, go to https://mapcanvas3d.com and move between routes in the navigation. |
Future feature work could include the ability to reset or clear the singleton, script tag, and
window.google
. This likely overlaps with #5.Looking for more feedback on uses cases and waiting for the singleton pattern get some more usage.
Note: This pattern may result in duplicate billing charge...
The text was updated successfully, but these errors were encountered: