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

Failed to execute 'createObjectURL' on 'URL': #1

Open
notflip opened this issue Apr 24, 2023 · 10 comments
Open

Failed to execute 'createObjectURL' on 'URL': #1

notflip opened this issue Apr 24, 2023 · 10 comments

Comments

@notflip
Copy link

notflip commented Apr 24, 2023

Thanks for your dev.to article, and this repo.
I'm trying to print a map on A3 paper.

When clicking print the following error occurs: Failed to execute 'createObjectURL' on 'URL': Overload resolution failed.
On line 73 in print.js

@jahow
Copy link
Owner

jahow commented Apr 24, 2023

Hmm, it might be that the printing failed for some reason and that the returned blob is empty. Have you changed anything in the code except from the paper size? What browser are you using?

Thanks!

@notflip
Copy link
Author

notflip commented Apr 25, 2023

I haven't changed anything in the code, I did a test run using the default code. Tested in Chrome browser

@jahow
Copy link
Owner

jahow commented Apr 25, 2023

Ok, do the examples on https://camptocamp.github.io/inkmap/master/ work for you?

Also could you maybe give your chrome version? Thanks!

@notflip
Copy link
Author

notflip commented Apr 25, 2023

@jahow those examples do work!

@jahow
Copy link
Owner

jahow commented Apr 25, 2023

I can't reproduce your issue, sorry. Can you give me your precise Chrome version number and device/OS?

@notflip
Copy link
Author

notflip commented Apr 25, 2023

That's interesting, I'm using Brave, which is Chrome behind the scenes. I'll try to run the script using another browser.

[Version 1.50.121 Chromium: 112.0.5615.138 (Official Build) (x86_64)](https://brave.com/latest/)

@notflip
Copy link
Author

notflip commented Apr 25, 2023

@jahow I'm sorry, I did change something, If you change line 18 in app.js to this

const mapCenter = fromLonLat([4.31712, 50.04856]);

It will show the error, maybe the bounding area is too small?

@jahow
Copy link
Owner

jahow commented Apr 25, 2023

Ok, I reproduced it, thanks. Looks like a bug in inkmap: if you request layers on a bbox that is completely outside of their covered area, the progress computation returns NaN and the image blob turns out to be null. I'm going to work on a fix. Thanks for finding it haha!!

@notflip
Copy link
Author

notflip commented Apr 26, 2023

Thank you for responding this fast! and the work you're doing! As a developer I've always found maps and mapping fascinating, seems like you made your job of it!

@jahow
Copy link
Owner

jahow commented Apr 26, 2023

I'm lucky enough to be in that position yes :) thanks for the kind words!

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