-
Notifications
You must be signed in to change notification settings - Fork 531
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
Issue when creating image of google maps #413
Comments
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
Run into the same issue |
I ran into a very similar issue, there way I have it is as follows:
htmlToImage.toJpeg(document.getElementById('my-node'), { quality: 0.95 })
.then(function (dataUrl) {
var link = document.createElement('a');
link.download = 'my-image-name.jpeg';
link.href = dataUrl;
link.click();
});
From the console log, I have the following error, but I don't think it is related: app-index.js:32 Error while reading CSS rules from https://fonts.googleapis.com/css?family=Google+Sans+Text:400&text=%E2%86%90%E2%86%92%E2%86%91%E2%86%93&lang=en DOMException: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules |
I actually managed to get it working. The source of the issue seems to be related to caching, using the following parameter did the trick for me: Here is a similar issue with its solution that lead me to that resolution: #431 |
@fabientownsend By setting |
It only solves the original issue 👍 I can confirm that the other error that I mentioned |
I am using google maps, and drawing some shapes on maps like Circle, Polygon etc.
When I try to capture 1st time, it works perfectly, but when I do it second time, it is not giving proper screenshot.
Expected Behavior
Should capture proper screenshot even on multiple attempts.
When I capture 1st time.
But when I capture 2nd time?
Also, if I reload the page, it will work 1st time, 2nd time it will not work.
The text was updated successfully, but these errors were encountered: