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

Slight potential issue with wms imageLoadFunction for requestMethod: post #1805

Closed
Grammostola opened this issue Aug 17, 2023 · 0 comments · Fixed by #1806
Closed

Slight potential issue with wms imageLoadFunction for requestMethod: post #1805

Grammostola opened this issue Aug 17, 2023 · 0 comments · Fixed by #1806

Comments

@Grammostola
Copy link
Contributor

Describe the bug
The URL.revokeObjectURL method may never get called (it should as per mdn for mem manag)

To Reproduce
Define a map with a wms-layer with prop requestMethod: 'post'
Edit
https://github.com/origo-map/origo/blob/master/src/layer/wms.js
so that a console message appears when the event handler containing the mentioned method runs like so:

      img.addEventListener('loadend', () => {
        console.log('img loadend, going to revoke')
        URL.revokeObjectURL(url);

There will probably not be anything logged to the console

Expected behavior
'img loadend, going to revoke' for every tile I think

Additional context
The way I understand it (may be insufficiently) the HTMLImageElement doesn't seem to emit a loadend event. It has an 'onload' handler property which appears to do the job. I will whip up the smallest pr

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

Successfully merging a pull request may close this issue.

1 participant